From 51b92c5c0ad3a47b264e3202da74ecf83f0aadd0 Mon Sep 17 00:00:00 2001 From: steinm Date: Wed, 12 Oct 2011 06:29:48 +0000 Subject: [PATCH] - added scripts for password change --- op/op.ChangePassword.php | 64 ++++++++++++++++++++++++++++++++++++++ out/out.ChangePassword.php | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 op/op.ChangePassword.php create mode 100644 out/out.ChangePassword.php diff --git a/op/op.ChangePassword.php b/op/op.ChangePassword.php new file mode 100644 index 000000000..c25b7af7b --- /dev/null +++ b/op/op.ChangePassword.php @@ -0,0 +1,64 @@ +" . getMLText("login") . "

\n"); + UI::htmlEndPage(); + return; +} + +if (isset($_POST["hash"])) { + $hash = sanitizeString($_POST["hash"]); +} +if (isset($_POST["newpassword"])) { + $newpassword = sanitizeString($_POST["newpassword"]); +} +if (isset($_POST["newpasswordrepeat"])) { + $newpasswordrepeat = sanitizeString($_POST["newpasswordrepeat"]); +} + +if (empty($newpassword) || empty($newpasswordrepeat) || $newpassword != $newpasswordrepeat) { + _printMessage(getMLText("password_mismatch_error_title"), "

".getMLText("password_mismatch_error")."

\n"); + exit; +} + +$user = $dms->checkPasswordRequest($hash); +if($user) { + $user->setPwd(md5($newpassword)); + $dms->deletePasswordRequest($hash); +} + +_printMessage(getMLText("change_password"), "

".getMLText("change_password_message")."

"); +exit; +?> + diff --git a/out/out.ChangePassword.php b/out/out.ChangePassword.php new file mode 100644 index 000000000..a8e74c216 --- /dev/null +++ b/out/out.ChangePassword.php @@ -0,0 +1,60 @@ + + + +
+0) { + echo ""; +} +if (isset($_REQUEST["hash"]) && strlen($_REQUEST["hash"])>0) { + echo ""; +} +?> + + + + + + + + + + + + +
">
+
+ + +

+ +