Users: After [35189], make 'illegal_user_logins' check case-insensitive.

Props juliobox.
Fixes #27317.

git-svn-id: https://develop.svn.wordpress.org/trunk@35629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2015-11-12 16:29:45 +00:00
parent 571084e0e1
commit 0cff629050
4 changed files with 22 additions and 7 deletions
+3 -1
View File
@@ -432,7 +432,9 @@ function wpmu_validate_user_signup($user_name, $user_email) {
}
/** This filter is documented in wp-includes/user-functions.php */
if ( in_array( $user_name, apply_filters( 'illegal_user_logins', array() ) ) ) {
$illegal_logins = apply_filters( 'illegal_user_logins', array() );
if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) {
$errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
}