From 2e288a108c8d7d58503fdd65e70bc34110011c2c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 2 Mar 2014 18:21:14 +0000 Subject: [PATCH] Remove redundant add_filter() call. see [24848]. fixes #27255. Built from https://develop.svn.wordpress.org/trunk@27351 git-svn-id: http://core.svn.wordpress.org/trunk@27202 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index c4963ba16b..2dbdb8f6f2 100644 --- a/wp-includes/user.php +++ b/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();