From 19f9dd29e9c38ce10e42fad38ee4f2afbb0ea3cf Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 9 Jan 2019 02:06:50 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@44489 git-svn-id: http://core.svn.wordpress.org/trunk@44320 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-login.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index bc51d886db..df9a91cf52 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44488'; +$wp_version = '5.1-alpha-44489'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index 7cb14cb39f..41fd85c2ea 100644 --- a/wp-login.php +++ b/wp-login.php @@ -334,7 +334,7 @@ function retrieve_password() { } elseif ( strpos( $_POST['user_login'], '@' ) ) { $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) ); if ( empty( $user_data ) ) { - $errors->add( 'invalid_email', __( 'ERROR: There is no user registered with that email address.' ) ); + $errors->add( 'invalid_email', __( 'ERROR: There is no account with that username or email address.' ) ); } } else { $login = trim( $_POST['user_login'] ); @@ -357,7 +357,7 @@ function retrieve_password() { } if ( ! $user_data ) { - $errors->add( 'invalidcombo', __( 'ERROR: Invalid username or email.' ) ); + $errors->add( 'invalidcombo', __( 'ERROR: There is no account with that username or email address.' ) ); return $errors; }