public function loginAction() { $form = new LoginForm($this); if ($this->POST) { if ($form->validate($_POST)) { try { $user = User::withCredentials($form->output['default']); $this->user->login($user); return $this->_redirect(''); } catch (NotEnoughFoundException $ex) { } } $form->input['pasword'] = ''; Session::error('Invalid login'); } return get_defined_vars(); }