public function signinAction() { if ($this->request->isPost()) { // getPost data $email = $this->request->getPost('email'); $password = $this->request->getPost('password'); // find the user $user = User::findFirstByUemail($email); if ($user) { // user found! if ($this->security->checkHash($password, $user->upassword)) { // password is valid } else { // password is wrong } } else { // user not found! } } else { # code... } }