Beispiel #1
0
                                }
                                die;
                            }
                        } else {
                            $loggers['audit']->notice("Attempted to reset password for non-existent student {$_POST['student_num']}");
                            if (ctype_digit($_POST['student_num'])) {
                                header('location:index.php?page=forgot-password&mode=bad_email_student_num&email=' . $_POST['email'] . '&student_num=' . $_POST['student_num']);
                            } else {
                                header('Location: index.php');
                            }
                            die;
                        }
                    } else {
                        if ($_GET['page'] === "confirm-password-reset") {
                            //Double check the users attempt to reset their password
                            $activation_status = $model->validateNewPasswordConfirmationLink($_GET);
                            $loggers['audit']->info("Password reset confirmation: {$activation_status}");
                            $l10n->addResource(__DIR__ . '/l10n/forgot-password-result.json');
                            require_once FS_PHP . '/header-external.php';
                            require_once 'views/forgot-password-result.php';
                            require_once FS_PHP . '/footer-external.php';
                        } else {
                            header('location: https://' . URL_PHP . '/error-external.php?eid=S001');
                            exit;
                        }
                    }
                }
            }
        }
    }
}