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