Make WordPress Core


Ignore:
Timestamp:
12/04/2015 11:24:56 PM (9 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r35742 r35772  
    147147
    148148    if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {
    149         $errors->add( 'illegal_user_login', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
     149        $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
    150150    }
    151151
Note: See TracChangeset for help on using the changeset viewer.