/** * Logout action * @param $request */ public function execute($request) { $authService = new AuthenticationService(); $authService->clearCredentials(); $this->redirect('auth/login'); }
public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array()) { parent::initialize($dispatcher, $storage, $options); if ($this->isTimedOut()) { $authService = new AuthenticationService(); $authService->clearCredentials(); $_SESSION = array(); } }