当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Auth_Storage_Session::clear方法代码示例

本文整理汇总了PHP中Zend_Auth_Storage_Session::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Auth_Storage_Session::clear方法的具体用法?PHP Zend_Auth_Storage_Session::clear怎么用?PHP Zend_Auth_Storage_Session::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Auth_Storage_Session的用法示例。


在下文中一共展示了Zend_Auth_Storage_Session::clear方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logoutAction

 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/');
 }
开发者ID:vmangla,项目名称:evendor,代码行数:7,代码来源:AuthController.php

示例2: logoutAction

 /**
  * 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');
 }
开发者ID:graniasty,项目名称:imap_zend,代码行数:11,代码来源:MultiController.php

示例3: logout

 /**
  * 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();
 }
开发者ID:Ewaldaz,项目名称:Be-your-light,代码行数:12,代码来源:User.php

示例4: logoutAction

 public function logoutAction()
 {
     $this->_helper->Session->setUserSession(null);
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
开发者ID:redaumore,项目名称:promociones,代码行数:7,代码来源:AuthController.php

示例5: clear

 public function clear()
 {
     if ($this->_session) {
         parent::clear();
     }
 }
开发者ID:shevron,项目名称:stoa,代码行数:6,代码来源:LazySession.php

示例6: deleteSession

 /**
  * 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;
 }
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:session.php

示例7: logoutAction

 public function logoutAction()
 {
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
开发者ID:nguyenkiet,项目名称:cafeteria,代码行数:6,代码来源:AuthController.php

示例8: logoutAction

 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');
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:9,代码来源:MemberController.php

示例9: clear

 /**
  * 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();
 }
开发者ID:epixa,项目名称:Epixa,代码行数:13,代码来源:Doctrine.php


注:本文中的Zend_Auth_Storage_Session::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。