Definition:
function wp_login($username, $password, $deprecated = '') {}
Checks a users login information and logs them in if it checks out. This function is deprecated.
Use the global $error to get the reason why the login failed. If the username is blank, no error will be set, so assume blank username on that case.
Parameters
- string $username: User’s username
- string $password: User’s password
- bool $deprecated: Not used
Return values
returns:False on login failure, true on successful check
Source code
function wp_login($username, $password, $deprecated = '') { _deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' ); global $error; $user = wp_authenticate($username, $password); if ( ! is_wp_error($user) ) return true; $error = $user->get_error_message(); return false; }
3879
No comments yet... Be the first to leave a reply!