Ticket #17793: 17793.2.diff
| File 17793.2.diff, 1.9 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/user.php
135 135 $user->user_pass = $pass1; 136 136 137 137 if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) ) 138 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ));138 $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 (.).' )); 139 139 140 140 if ( !$update && username_exists( $user->user_login ) ) 141 141 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' )); -
wp-login.php
312 312 if ( $sanitized_user_login == '' ) { 313 313 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) ); 314 314 } elseif ( ! validate_username( $user_login ) ) { 315 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ) );315 $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 (.).' ) ); 316 316 $sanitized_user_login = ''; 317 317 } elseif ( username_exists( $sanitized_user_login ) ) { 318 318 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );