function secureLogin($user) { if (isset($user)) { // login \SKS\LIB\Session::init(); \SKS\LIB\Session::setLoggedInUser($user); header("location:" . URL . "dashboard"); } else { $this->view->email = $_POST["email"]; $this->view->title = "Login"; $this->view->error = "Email or Password is wrong."; $this->view->render("login/index"); } }
function secureLogin($user) { if (isset($user)) { // login \SKS\LIB\Session::init(); \SKS\LIB\Session::setLoggedInUser($user); //echo "setting user session" . $user-getId(); header("location:" . URL); } else { $this->view->email = $this->getPostValue("login_email"); $this->view->title = "Login"; $this->view->error = "Email or Password is wrong."; $this->setTitle('Login'); $this->view->render("login/login"); } }