Ticket #31787: 31787.patch
File 31787.patch, 1.9 KB (added by , 10 years ago) |
---|
-
src/wp-login.php
278 278 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.')); 279 279 } elseif ( strpos( $_POST['user_login'], '@' ) ) { 280 280 $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) ); 281 if ( empty( $user_data ) )282 $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));283 281 } else { 284 282 $login = trim($_POST['user_login']); 285 283 $user_data = get_user_by('login', $login); … … 295 293 if ( $errors->get_error_code() ) 296 294 return $errors; 297 295 298 if ( !$user_data ) {299 $errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or e-mail.'));300 return $errors;301 }302 303 296 // Redefining user_login ensures we return the right case in the email. 297 if ( $user_data ) { 304 298 $user_login = $user_data->user_login; 305 299 $user_email = $user_data->user_email; 300 } else { 301 return; 302 } 306 303 307 304 /** 308 305 * Fires before a new password is retrieved. … … 861 858 elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) 862 859 $errors->add('registerdisabled', __('User registration is currently not allowed.')); 863 860 elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) 864 $errors->add('confirm', __('Check your e-mail for the confirmation link.'), 'message');861 $errors->add('confirm', __('If this username or email address is correct, you will receive an email confirmation link shortly.'), 'message'); 865 862 elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) 866 863 $errors->add('newpass', __('Check your e-mail for your new password.'), 'message'); 867 864 elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )