WordPress.org

Make WordPress Core

Ticket #12129: 12129.diff

File 12129.diff, 2.0 KB (added by scohoust, 4 years ago)
  • wp-includes/user.php

     
    8686        $userdata = get_user_by('login', $username); 
    8787 
    8888        if ( !$userdata ) 
    89                 return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 
     89                return new WP_Error('invalidcombo', sprintf(__('<strong>ERROR</strong>: Incorrect username or password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 
    9090 
    9191        if ( is_multisite() ) { 
    9292                // Is user marked as spam? 
     
    106106                return $userdata; 
    107107 
    108108        if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) 
    109                 return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: Incorrect password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 
     109                return new WP_Error('invalidcombo', sprintf(__('<strong>ERROR</strong>: Incorrect username or password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 
    110110 
    111111        $user =  new WP_User($userdata->ID); 
    112112        return $user; 
  • wp-login.php

     
    572572        login_header(__('Log In'), '', $errors); 
    573573 
    574574        if ( isset($_POST['log']) ) 
    575                 $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : ''; 
     575                $user_login = ( 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : ''; 
    576576?> 
    577577 
    578578<?php if ( !isset($_GET['checkemail']) || !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>