Ticket #17793: 17793.3.diff
| File 17793.3.diff, 2.0 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/includes/user.php
144 144 $user->user_pass = $pass1; 145 145 146 146 if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) ) 147 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ));147 $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 (.).' ) ); 148 148 149 149 if ( !$update && username_exists( $user->user_login ) ) 150 150 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' )); -
src/wp-includes/user-functions.php
1944 1944 if ( $sanitized_user_login == '' ) { 1945 1945 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) ); 1946 1946 } elseif ( ! validate_username( $user_login ) ) { 1947 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. ' ) );1947 $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 (.).' ) ); 1948 1948 $sanitized_user_login = ''; 1949 1949 } elseif ( username_exists( $sanitized_user_login ) ) { 1950 1950 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );