mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Use 'invalid_username' error code when tripping 'illegal_user_logins'.
This gives us better compatibility with existing errors thrown by `sanitize_user()`, especially in Multisite, where user_login has more restrictions on allowed characters. Props markjaquith. Fixes #27317. git-svn-id: https://develop.svn.wordpress.org/trunk@35772 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -146,7 +146,7 @@ function edit_user( $user_id = 0 ) {
|
||||
$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.' ) );
|
||||
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
|
||||
}
|
||||
|
||||
/* checking email address */
|
||||
|
||||
Reference in New Issue
Block a user