diff options
author | Andrew Dolgov <[email protected]> | 2005-11-20 07:38:13 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-20 07:38:13 +0100 |
commit | b791095df47cc0022f0b2bdccb01812dc6a6bb72 (patch) | |
tree | 5bc17bcd8f1f0dedc15e0cd469e0e5a65b68f813 /backend.php | |
parent | a029d5309fa160d6e05b93bf41049b0e649a43bd (diff) |
password change feedback
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/backend.php b/backend.php index 0322743ba..fe2245fae 100644 --- a/backend.php +++ b/backend.php @@ -1698,11 +1698,15 @@ if (db_num_rows($result) == 1) { db_query($link, "UPDATE ttrss_users SET pwd_hash = '$new_pw_hash' WHERE id = '$active_uid'"); + + $_SESSION["pwd_change_result"] = "ok"; + } else { + $_SESSION["pwd_change_result"] = "failed"; } } header("Location: prefs.php"); - + } else if ($subop == "Reset to defaults") { if (WEB_DEMO_MODE) return; @@ -1729,11 +1733,25 @@ pwd_hash = 'SHA1:".sha1("password")."')"); if (db_num_rows($result) != 0) { - print "<div class=\"warning\"><b>Warning</b>: + print "<div class=\"warning\"> Your password is at default value, please change it. </div>"; } + if ($_SESSION["pwd_change_result"] == "failed") { + print "<div class=\"warning\"> + There was an error while changing your password. + </div>"; + } + + if ($_SESSION["pwd_change_result"] == "ok") { + print "<div class=\"notice\"> + Password changed successfully. + </div>"; + } + + $_SESSION["pwd_change_result"] = ""; + print "<form action=\"backend.php\" method=\"POST\">"; print "<table width=\"100%\" class=\"prefPrefsList\">"; |