added forgot/reset password feature
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user