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 ""; +} +?> + + + + + + + + + + + + +
">
+
+ + +

+ +