public function login() { if (!$this->input->post('username')) { Authenticate::showForm("No Username given, Please enter a Username."); } $quary = $this->Auth->getUserData($this->input->post('username')); if (password_verify($this->input->post('password'), $quary['password'])) { $this->Auth->setSession($quary); redirect('/admin'); } else { Authenticate::showForm("Invalid Login attempt"); } }