From 396b57920f173da293c7954c2c9064a9d2c189d2 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 8 Dec 2010 21:25:52 +0000 Subject: [PATCH] Include the username in the incorrect password message, for clarity. fixes #14575. git-svn-id: https://develop.svn.wordpress.org/trunk@16821 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/user.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 6feb062dc2..d24c20b2d6 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -106,7 +106,8 @@ function wp_authenticate_username_password($user, $username, $password) { return $userdata; if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) - return new WP_Error('incorrect_password', sprintf(__('ERROR: Incorrect password. Lost your password?'), site_url('wp-login.php?action=lostpassword', 'login'))); + return new WP_Error( 'incorrect_password', sprintf( __( 'ERROR: The password you entered for the username %1$s is incorrect. Lost your password?' ), + $username, site_url( 'wp-login.php?action=lostpassword', 'login' ) ) ); $user = new WP_User($userdata->ID); return $user;