Example #1
0
 public function logoutAction()
 {
     $storage = new Zend_Auth_Storage_Session('company_type');
     $storage->clear();
     $this->_flashMessenger->addMessage('<div class="div-success">You have logged out successfully</div>');
     $this->_redirect('company/auth/');
 }
Example #2
0
 /**
  * destroys Auth data, destroys Session data, redirect to home page
  */
 public function logoutAction()
 {
     $sess = Zend_Registry::get('session');
     $sess->transfers = array();
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/index');
 }
Example #3
0
 /**
  * Logout
  *
  * @return void 
  */
 public function logout()
 {
     // Register logout in the access log, clear session and redirect to the public index page
     $this->_accessLog->insertAccessLog(Admin_View_Helper_Authentication::getLoggedUserName(), Enum_ActivityType::Logout);
     $storage = new Zend_Auth_Storage_Session('www.beyourlight.co.uk');
     $storage->clear();
 }
Example #4
0
 public function logoutAction()
 {
     $this->_helper->Session->setUserSession(null);
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
Example #5
0
 public function clear()
 {
     if ($this->_session) {
         parent::clear();
     }
 }
Example #6
0
 /**
  * Delete current session datas
  *
  * @param boolean $force : force removing persistent session (default false)
  * @return void
  * @access public
  * @static
  */
 static function deleteSession($force = false)
 {
     //clear session storage
     $authStorage = new Zend_Auth_Storage_Session('atm-auth');
     $authStorage->clear();
     //clear session table
     $sql = "\n\t\t\tdelete\n\t\t\tfrom\n\t\t\t\tsessions\n\t\t\twhere\n\t\t\t\tphpid_ses='" . io::sanitizeSQLString(Zend_Session::getId()) . "'\n\t\t";
     if (!$force) {
         //keep session with persistent cookie
         $sql .= "\n\t\t\t\tand (\n\t\t\t\t\tUNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastTouch_ses) > " . io::sanitizeSQLString(APPLICATION_SESSION_TIMEOUT) . "\n\t\t\t\t\tand cookie_expire_ses = '0000-00-00 00:00:00'\n\t\t\t\t) or (\n\t\t\t\t\tcookie_expire_ses != '0000-00-00 00:00:00'\n\t\t\t\t\tand TO_DAYS(NOW()) >= cookie_expire_ses\n\t\t\t\t)\n\t\t\t";
     } else {
         //remove autologin cookie if exists
         if (isset($_COOKIE[CMS_session::getAutoLoginCookieName()])) {
             //remove cookie
             CMS_session::setCookie(CMS_session::getAutoLoginCookieName());
         }
     }
     $q = new CMS_query($sql);
     //remove phpMyAdmin cookies if any
     @setcookie(session_name(), false, time() - 3600, PATH_REALROOT_WR . '/automne/phpMyAdmin/', '', 0);
     @setcookie('phpMyAdmin', false, time() - 3600, PATH_REALROOT_WR . '/automne/phpMyAdmin/', '', 0);
     return true;
 }
Example #7
0
 public function logoutAction()
 {
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
Example #8
0
 public function logoutAction()
 {
     $this->Member->log('Signed out', 'Members');
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     unset($_SESSION['Member'], $_SESSION['Role']);
     session_destroy();
     $this->_redirect('/admin');
 }
Example #9
0
 /**
  * Clears contents from local and persistent storage
  */
 public function clear()
 {
     if (null !== $this->read()) {
         $em = $this->getEntityManager();
         $em->remove($this->session);
         $em->flush();
         $this->session = null;
     }
     parent::clear();
 }