Core Function
View Source on Trac ↗ wp_authenticate_cookie()
wp_authenticate_cookie( mixed $user, mixed $username, mixed $password ) Authenticates the user using the WordPress auth cookie.
Parameters 3 required
| Name / Type | Description |
|---|---|
| (WP_User | | WP_Error | null) $user WP_User or WP_Error object from a previous callback. Default null. Required |
| $username string | Username. If not empty, cancels the cookie authentication. Required |
| $password string | Password. If not empty, cancels the cookie authentication. Required |
Return Value
((WP_User)
| WP_Error) WP_User on success, WP_Error on failure.
Function Information
Since Version
2.8.0
Source File
wp-includes/user.php
Advertisement