public function __index($token = null) { if ((new SecureSiteBase())->loginRequest($_POST) == true) { //Process the login form header("Location: " . BASE_URL . "/home/index"); exit; } $login = new SecureSiteBase(); $login->setFramework(new SMVC\SecureSite\Bootstrap\SecurityForms()); $this->view('pages/landingPage', array('form' => $login->loginForm(array('token' => $token)))); }
public function forgotpassword() { $login = new SecureSiteBase(); $login->setFramework(new SMVC\SecureSite\Bootstrap\SecurityForms()); if (isset($_POST['emailAddress'])) { $mailer = 'InternalMailer'; $mailer = ROOT_NAMESPACE . '\\Emails\\' . $mailer . '\\Emails'; //Fully quallified namespace $email = new EmailBase(new $mailer()); $email->transactionalEmail('*****@*****.**', 'Temporary password', $login->tempPasswordEmailBody($_POST['emailAddress'])); } $this->view('pages/landingPage', array('form' => $login->passwordReminderForm())); }