本文整理汇总了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/');
}
示例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');
}
示例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();
}
示例4: logoutAction
public function logoutAction()
{
$this->_helper->Session->setUserSession(null);
$storage = new Zend_Auth_Storage_Session();
$storage->clear();
$this->_redirect('auth/login');
}
示例5: clear
public function clear()
{
if ($this->_session) {
parent::clear();
}
}
示例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;
}
示例7: logoutAction
public function logoutAction()
{
$storage = new Zend_Auth_Storage_Session();
$storage->clear();
$this->_redirect('auth/login');
}
示例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');
}
示例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();
}