From 0a4bc18a4f7208e1dd96542d137e7252c6f370fc Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 25 Jul 2008 06:32:53 +0000 Subject: [PATCH] Login: keep username when password is incorrect and focus on password field git-svn-id: https://develop.svn.wordpress.org/trunk@8454 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-login.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-login.php b/wp-login.php index e1fa23b526..32f3b55dcf 100644 --- a/wp-login.php +++ b/wp-login.php @@ -449,13 +449,16 @@ default: elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message'); login_header(__('Login'), '', $errors); + + if ( isset($_POST['log']) ) + $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? attribute_escape(stripslashes($_POST['log'])) : ''; ?>

+