Ticket #17793: 17793.diff
| File 17793.diff, 1.9 KB (added by , 14 years ago) |
|---|
-
wp-login.php
298 298 if ( $sanitized_user_login == '' ) { 299 299 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) ); 300 300 } elseif ( ! validate_username( $user_login ) ) { 301 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ) );301 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. Usernames may contain only letters (a-z), numbers (0-9), dashes (-), underscores (_), and periods (.).' ) ); 302 302 $sanitized_user_login = ''; 303 303 } elseif ( username_exists( $sanitized_user_login ) ) { 304 304 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) ); -
wp-admin/includes/user.php
161 161 $user->user_pass = $pass1; 162 162 163 163 if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) ) 164 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ));164 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. Usernames may contain only letters (a-z), numbers (0-9), dashes (-), underscores (_), and periods (.).' )); 165 165 166 166 if ( !$update && username_exists( $user->user_login ) ) 167 167 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));