예제 #1
0
파일: index.php 프로젝트: hughnguy/php
                if (filter_var($_POST['email'] . EMAIL_ORG_STAFF_DOMAIN, FILTER_VALIDATE_EMAIL)) {
                    header('Location: index.php?page=forgot-password&mode=password_mismatch&email=' . $_POST['email']);
                    exit;
                }
                header('Location: index.php');
                exit;
            }
        } else {
            $loggers['audit']->notice("Failed password reset attempt - invalid email");
            if (filter_var($_POST['email'] . EMAIL_ORG_STAFF_DOMAIN, FILTER_VALIDATE_EMAIL)) {
                header('Location: index.php?page=forgot-password&mode=bad_email&email=' . $_POST['email']);
                exit;
            }
            header('Location: index.php');
            exit;
        }
    } else {
        if ($_GET['page'] === "confirm-password-reset") {
            //Double check the users attempt to reset their password
            $activation_status = $faculty_profile->validateNewPasswordConfirmationLink($_GET);
            $loggers['audit']->info("Attempted confirmation of password reset for user {$_GET['email']}");
            $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=F001');
            exit;
        }
    }
}