mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Username sanitization cleanups.
git-svn-id: https://develop.svn.wordpress.org/trunk@3481 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -27,7 +27,10 @@ case 'register':
|
||||
$errors['user_email'] = __('<strong>ERROR</strong>: The email address isn’t correct.');
|
||||
}
|
||||
|
||||
if ( username_exists( $user_login ) )
|
||||
if ( ! validate_username($user_login) )
|
||||
$errors['user_login'] = __('<strong>ERROR</strong>: This username is invalid. Please enter a valid username.');
|
||||
|
||||
if ( username_exists( $user_login ) )
|
||||
$errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
|
||||
|
||||
/* checking the email isn't already used by another user */
|
||||
|
||||
Reference in New Issue
Block a user