From: Andrew Dolgov Date: Sun, 20 Nov 2005 06:38:13 +0000 (+0100) Subject: password change feedback X-Git-Tag: schema_feature_freeze_for_1.1~172 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b791095df47cc0022f0b2bdccb01812dc6a6bb72;p=tt-rss.git password change feedback --- diff --git a/backend.php b/backend.php index 0322743b..fe2245fa 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 "
Warning: + print "
Your password is at default value, please change it.
"; } + if ($_SESSION["pwd_change_result"] == "failed") { + print "
+ There was an error while changing your password. +
"; + } + + if ($_SESSION["pwd_change_result"] == "ok") { + print "
+ Password changed successfully. +
"; + } + + $_SESSION["pwd_change_result"] = ""; + print "
"; print "";