REST API: Use strict in_array() checks for the list of usernames blacklisted via illegal_user_logins filter.
See #48839. Built from https://develop.svn.wordpress.org/trunk@46804 git-svn-id: http://core.svn.wordpress.org/trunk@46604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -488,7 +488,7 @@ function wpmu_validate_user_signup( $user_name, $user_email ) {
|
||||
/** This filter is documented in wp-includes/user.php */
|
||||
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
|
||||
|
||||
if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) {
|
||||
if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ), true ) ) {
|
||||
$errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user