From 8cc1d4e7aec9390f5bd30ccded80b4c4c28834d9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 2 Mar 2014 18:20:06 +0000 Subject: [PATCH] Remove redundant add_filter() call. see [24848]. fixes #27255. git-svn-id: https://develop.svn.wordpress.org/trunk@27351 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index c4963ba16b..2dbdb8f6f2 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -102,9 +102,10 @@ function wp_signon( $credentials = array(), $secure_cookie = '' ) { /** * Authenticate the user using the username and password. */ -add_filter('authenticate', 'wp_authenticate_username_password', 20, 3); 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 ( is_wp_error( $user ) ) @@ -150,7 +151,9 @@ function wp_authenticate_username_password($user, $username, $password) { * Authenticate the user using the WordPress auth cookie. */ function wp_authenticate_cookie($user, $username, $password) { - if ( is_a($user, 'WP_User') ) { return $user; } + if ( is_a( $user, 'WP_User' ) ) { + return $user; + } if ( empty($username) && empty($password) ) { $user_id = wp_validate_auth_cookie();