Make WordPress Core

Changeset 44489


Ignore:
Timestamp:
01/09/2019 02:05:08 AM (6 years ago)
Author:
pento
Message:

Login: Improve the error message when retrieving a lost password.

When an invalid username or email address is entered, the form now displays a better error message.

Props mrtortai, iamfriendly, TomHarrigan, afercia, pento.
Fixes #31788.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r44396 r44489  
    335335        $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
    336336        if ( empty( $user_data ) ) {
    337             $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no user registered with that email address.' ) );
     337            $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) );
    338338        }
    339339    } else {
     
    358358
    359359    if ( ! $user_data ) {
    360         $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: Invalid username or email.' ) );
     360        $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) );
    361361        return $errors;
    362362    }
Note: See TracChangeset for help on using the changeset viewer.