Ticket #22367: 22367.patch
| File 22367.patch, 1.4 KB (added by , 13 years ago) |
|---|
-
wp-admin/user-new.php
41 41 check_admin_referer( 'add-user', '_wpnonce_add-user' ); 42 42 43 43 $user_details = null; 44 if ( false !== strpos($_REQUEST[ 'email' ], '@') ) {44 if ( is_email( $_REQUEST[ 'email' ] ) ) { 45 45 $user_details = get_user_by('email', $_REQUEST[ 'email' ]); 46 46 } else { 47 47 if ( is_super_admin() ) { -
wp-includes/user.php
469 469 if ( $qv['search_columns'] ) 470 470 $search_columns = array_intersect( $qv['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename' ) ); 471 471 if ( ! $search_columns ) { 472 if ( false !== strpos( $search, '@') )472 if ( is_email( $search ) ) 473 473 $search_columns = array('user_email'); 474 474 elseif ( is_numeric($search) ) 475 475 $search_columns = array('user_login', 'ID'); -
wp-login.php
187 187 188 188 if ( empty( $_POST['user_login'] ) ) { 189 189 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.')); 190 } else if ( strpos( $_POST['user_login'], '@') ) {190 } else if ( is_email( $_POST['user_login'] ) ) { 191 191 $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) ); 192 192 if ( empty( $user_data ) ) 193 193 $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));