added forgot/reset password feature

This commit is contained in:
James Richie
2026-05-08 14:24:42 -04:00
parent d2a1ea88b3
commit d572a6de3b
5 changed files with 511 additions and 2 deletions
+29
View File
@@ -266,6 +266,18 @@ class Base {
$_SESSION[self::TODAY] = date("Y-m-d");
// Get the requested Action
$action = filter_input(INPUT_POST, "action") ?: "";
$Xaction = filter_input(INPUT_GET, "Xaction") ?: "";
$action = (empty($Xaction) ? $action : $Xaction);
if ($Xaction == 'resetpassword') {
$this->resetpassword();
}
// Login
if (($_SESSION[self::USER_AUTHENTICATED] ?? false) === false) {
@@ -784,6 +796,23 @@ class Base {
exit();
}
// =====================
// Forgot/Reset Password
// =====================
public function resetpassword() {
include_once 'classes/Authentication.php';
$reset = (new Authentication())->resetPassword() ? true : false;
$XSLParms["BTN_SUBMIT"] = "main.php?action=Users.signIn&step=authenticate";
$XSLParms["RESET_PASSWORD_SUCCESSFUL"] = "TRUE";
echo $this->applyXSL("", $this->getXSL("signIn"), $XSLParms);
die();
}
}
?>