From 3d7aa47df88002242d114569ea09b2b211c4524e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 15 Oct 2015 05:45:50 +0000 Subject: [PATCH] Remove a one-time variable from `edit_user()` added in [35189]. See #27317. git-svn-id: https://develop.svn.wordpress.org/trunk@35190 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/user.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php index 3ec716e08e..1d132b372f 100644 --- a/src/wp-admin/includes/user.php +++ b/src/wp-admin/includes/user.php @@ -143,8 +143,7 @@ function edit_user( $user_id = 0 ) { $errors->add( 'user_login', __( 'ERROR: This username is already registered. Please choose another one.' )); /** This filter is documented in wp-includes/user-functions.php */ - $usernames = apply_filters( 'illegal_user_logins', array() ); - if ( in_array( $user->user_login, $usernames ) ) { + if ( in_array( $user->user_login, apply_filters( 'illegal_user_logins', array() ) ) ) { $errors->add( 'illegal_user_login', __( 'ERROR: Sorry, that username is not allowed.' ) ); }