Username sanitization cleanups.

git-svn-id: https://develop.svn.wordpress.org/trunk@3481 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-01-25 03:09:16 +00:00
parent 696afcde2e
commit a2e19bdbef
4 changed files with 28 additions and 5 deletions

View File

@@ -27,7 +27,10 @@ case 'register':
$errors['user_email'] = __('<strong>ERROR</strong>: The email address isn&#8217;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 */