Ticket #39645: 39645.diff
| File 39645.diff, 1.2 KB (added by , 9 years ago) |
|---|
-
wp-includes/user.php
2279 2279 // Check the username 2280 2280 if ( $sanitized_user_login == '' ) { 2281 2281 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) ); 2282 } elseif ( $sanitized_user_login == 'admin' || $sanitized_user_login == 'Admin') { 2283 // Don't let somebody fake an admin account 2284 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Cheatin’ uh?' ) ); 2282 2285 } elseif ( ! validate_username( $user_login ) ) { 2283 2286 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 2284 2287 $sanitized_user_login = ''; 2285 2288 } elseif ( username_exists( $sanitized_user_login ) ) { 2286 2289 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) ); 2287 2288 2290 } else { 2289 2291 /** This filter is documented in wp-includes/user.php */ 2290 2292 $illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );