Fix wp_authenticate_user hook

git-svn-id: https://develop.svn.wordpress.org/trunk@10683 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-03-02 22:25:55 +00:00
parent 0560f26f76
commit d268b67e84

View File

@ -89,9 +89,9 @@ function wp_authenticate_username_password($user, $username, $password) {
return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
}
$user = apply_filters('wp_authenticate_user', $user, $password);
if ( is_wp_error($user) ) {
return $user;
$userdata = apply_filters('wp_authenticate_user', $userdata, $password);
if ( is_wp_error($userdata) ) {
return $userdata;
}
if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) {