diff --git a/login_password_page.php b/login_password_page.php index 054c152840..9b016abd7a 100644 --- a/login_password_page.php +++ b/login_password_page.php @@ -257,7 +257,7 @@ class="form-control autofocus"> stop here! if( $t_show_reset_password ) { - echo '', lang_get( 'lost_password_link' ), ''; + echo '', lang_get( 'lost_password_link' ), ''; } ?> diff --git a/lost_pwd_page.php b/lost_pwd_page.php index 15a593aa70..ae6ba5dd76 100644 --- a/lost_pwd_page.php +++ b/lost_pwd_page.php @@ -51,6 +51,17 @@ trigger_error( ERROR_LOST_PASSWORD_NOT_ENABLED, ERROR ); } +$f_username = gpc_get_string( 'username', '' ); +$t_username = auth_prepare_username( $f_username ); + +# Determine whether the username or password field should receive automatic focus. +$t_username_field_autofocus = 'autofocus'; +$t_email_field_autofocus = ''; +if( $t_username ) { + $t_username_field_autofocus = ''; + $t_email_field_autofocus = 'autofocus'; +} + # don't index lost password page html_robots_noindex(); @@ -86,7 +97,8 @@ + value="" + size="32" maxlength="" class="form-control "> @@ -94,7 +106,7 @@ + size="32" maxlength="64" class="form-control ">