Fix wp_authenticate_user hook
git-svn-id: http://svn.automattic.com/wordpress/trunk@10683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43ba2effcd
commit
d4a2f81323
|
@ -89,9 +89,9 @@ function wp_authenticate_username_password($user, $username, $password) {
|
||||||
return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
|
return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = apply_filters('wp_authenticate_user', $user, $password);
|
$userdata = apply_filters('wp_authenticate_user', $userdata, $password);
|
||||||
if ( is_wp_error($user) ) {
|
if ( is_wp_error($userdata) ) {
|
||||||
return $user;
|
return $userdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) {
|
if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) {
|
||||||
|
|
Loading…
Reference in New Issue