diff --git a/html/user/edit_passwd_action.php b/html/user/edit_passwd_action.php index 79a24a411e..f6ad3fa176 100644 --- a/html/user/edit_passwd_action.php +++ b/html/user/edit_passwd_action.php @@ -1,7 +1,7 @@ passwd_hash != $passwd_hash) { - error_page(tra("Invalid password")); - } + +$passwd_hash = md5($passwd.$user->email_addr); +$result = $user->update("passwd_hash='$passwd_hash'"); +if (!$result) { + error_page(tra("We can't update your password due to a database problem. Please try again later.")); } page_head(tra("Change password")); -$passwd_hash = md5($passwd.$user->email_addr); -$result = $user->update("passwd_hash='$passwd_hash'"); -if ($result) { - echo tra("Your password has been changed."); -} else { - echo tra("We can't update your password due to a database problem. Please try again later."); -} - +echo tra("Your password has been changed."); page_tail(); + ?> diff --git a/html/user/edit_passwd_form.php b/html/user/edit_passwd_form.php index 60f576114a..795b356582 100644 --- a/html/user/edit_passwd_form.php +++ b/html/user/edit_passwd_form.php @@ -1,7 +1,7 @@ "; - -if ($user) { - echo " - authenticator> - "; - start_table(); -} else { - start_table(); - row1(tra("You can identify yourself using either"). - "" - ); - row2(tra("Email address"), ""); - row2(tra("Current password"), ""); - row2( - tra("OR: Account key"). - "
".tra("Get account key by email")."", - "" - ); -} +start_table(); row2(tra("New password"), ""); row2(tra("New password, again"), ""); row2("", "");