/** * @Route ("/logout") * * @return string */ public function logout() { if (Session::isStarted()) { ChatIntegrationService::instance()->deleteChatSession(Session::getSessionId()); Session::destroy(); } return 'redirect: /'; }
/** * Logout a user */ public function logout() { ChatIntegrationService::instance()->deleteChatSession(); $userId = Session::getCredentials()->getUserId(); if (!empty($userId)) { $this->clearRememberMe($userId); } Session::destroy(); }