From 387f3eebf20a48d048eb9c2b221000b3f637666e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 8 Jun 2021 23:33:16 +0000 Subject: [PATCH] Login and Registration: Improve the unknown username error message The new message is more clear and makes the next step more clear to the user. Props dd32, SergeyBiryukov, audrasjb, desrosj, dlh, marybaum, chanthaboune, jeffpaul. Fixes #52915. git-svn-id: https://develop.svn.wordpress.org/trunk@51126 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 82b5013a08..858d4a065d 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -149,7 +149,11 @@ function wp_authenticate_username_password( $user, $username, $password ) { if ( ! $user ) { return new WP_Error( 'invalid_username', - __( 'Error: Unknown username. Check again or try your email address.' ) + sprintf( + /* translators: %s: User name. */ + __( 'Error: The username %s is not registered on this site. If you are unsure of your username, try your email address instead.' ), + $username + ) ); }