Cast 'illegal_user_logins' filter result to array.

See #27317.
Built from https://develop.svn.wordpress.org/trunk@35630


git-svn-id: http://core.svn.wordpress.org/trunk@35594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2015-11-12 16:34:27 +00:00
parent b08ae1d60b
commit 95c55ca251
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ function edit_user( $user_id = 0 ) {
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));
/** This filter is documented in wp-includes/user-functions.php */
$illegal_logins = apply_filters( 'illegal_user_logins', array() );
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {
$errors->add( 'illegal_user_login', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );