/** * Logout user * * @param $hash */ public function logout($hash) { /** @var User $model */ $model = $this->authByHash($hash); $model->setUserhash(null); $this->getEntityManager()->flush(); Auth::logout(); }
/** * Logout action */ public function logoutAction() { Auth::logout(); $this->redirect('/'); }