Make WordPress Core

Ticket #43037: 43037.3.diff

File 43037.3.diff, 1.0 KB (added by ryokuhi, 5 years ago)

Clarifies error messages in login page when the user enters invalid username or email address.

  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 69b8c35208..6e8ad04759 100644
    a b function wp_authenticate_username_password( $user, $username, $password ) { 
    149149        if ( ! $user ) {
    150150                return new WP_Error(
    151151                        'invalid_username',
    152                         __( '<strong>ERROR</strong>: Invalid username.' ) .
    153                         ' <a href="' . wp_lostpassword_url() . '">' .
    154                         __( 'Lost your password?' ) .
    155                         '</a>'
     152                        __( '<strong>ERROR</strong>: Invalid username. Try again, you can also use your email address.' )
    156153                );
    157154        }
    158155
    function wp_authenticate_email_password( $user, $email, $password ) { 
    230227        if ( ! $user ) {
    231228                return new WP_Error(
    232229                        'invalid_email',
    233                         __( '<strong>ERROR</strong>: Invalid email address.' ) .
    234                         ' <a href="' . wp_lostpassword_url() . '">' .
    235                         __( 'Lost your password?' ) .
    236                         '</a>'
     230                        __( '<strong>ERROR</strong>: Invalid email address. Try again, you can also use your username.' )
    237231                );
    238232        }
    239233