mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-08 16:41:44 +01:00
Don't override an existing WP_Error object in wp_authenticate_username_password().
props willnorris. fixes #19714. git-svn-id: http://core.svn.wordpress.org/trunk@24850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
23bc457498
commit
34ce599935
@ -73,6 +73,9 @@ function wp_authenticate_username_password($user, $username, $password) {
|
|||||||
if ( is_a($user, 'WP_User') ) { return $user; }
|
if ( is_a($user, 'WP_User') ) { return $user; }
|
||||||
|
|
||||||
if ( empty($username) || empty($password) ) {
|
if ( empty($username) || empty($password) ) {
|
||||||
|
if ( is_wp_error( $user ) )
|
||||||
|
return $user;
|
||||||
|
|
||||||
$error = new WP_Error();
|
$error = new WP_Error();
|
||||||
|
|
||||||
if ( empty($username) )
|
if ( empty($username) )
|
||||||
|
Loading…
Reference in New Issue
Block a user