diff --git a/wp-register.php b/wp-register.php index e0c6c04365..1a4dc78e2f 100644 --- a/wp-register.php +++ b/wp-register.php @@ -25,10 +25,13 @@ case 'register': $errors['user_email'] = __('ERROR: Please type your e-mail address.'); } else if (!is_email($user_email)) { $errors['user_email'] = __('ERROR: The email address isn’t correct.'); + $user_email = ''; } - if ( ! validate_username($user_login) ) + if ( ! validate_username($user_login) ) { $errors['user_login'] = __('ERROR: This username is invalid. Please enter a valid username.'); + $user_login = ''; + } if ( username_exists( $user_login ) ) $errors['user_login'] = __('ERROR: This username is already registered, please choose another one.'); @@ -65,9 +68,9 @@ case 'register':