Remove redundant add_filter() call. see [24848]. fixes #27255.
git-svn-id: https://develop.svn.wordpress.org/trunk@27351 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3299e358d2
commit
8cc1d4e7ae
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user