Add link to password recovery in login error messages. Props Denis-de-Bernardy. fixes #9442
git-svn-id: http://svn.automattic.com/wordpress/trunk@10960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6ecb1077d7
commit
178a1fdda0
|
@ -86,7 +86,7 @@ function wp_authenticate_username_password($user, $username, $password) {
|
|||
$userdata = get_userdatabylogin($username);
|
||||
|
||||
if ( !$userdata || ($userdata->user_login != $username) ) {
|
||||
return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
|
||||
return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));
|
||||
}
|
||||
|
||||
$userdata = apply_filters('wp_authenticate_user', $userdata, $password);
|
||||
|
@ -95,7 +95,7 @@ function wp_authenticate_username_password($user, $username, $password) {
|
|||
}
|
||||
|
||||
if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) {
|
||||
return new WP_Error('incorrect_password', __('<strong>ERROR</strong>: Incorrect password.'));
|
||||
return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: Incorrect password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));
|
||||
}
|
||||
|
||||
$user = new WP_User($userdata->ID);
|
||||
|
|
Loading…
Reference in New Issue