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


PHP XenForo_Helper_Cookie::deleteAllCookies方法代码示例

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


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

示例1: actionIndex

 /**
  * Single-stage logout procedure
  */
 public function actionIndex()
 {
     $csrfToken = $this->_input->filterSingle('_xfToken', XenForo_Input::STRING);
     $redirectResponse = $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, $this->getDynamicRedirect(false, false));
     $userId = XenForo_Visitor::getUserId();
     if (!$userId) {
         return $redirectResponse;
     }
     if ($this->_noRedirect() || !$csrfToken) {
         // request is likely from JSON, probably XenForo.OverlayTrigger, so show a confirmation dialog
         return $this->responseView('XenForo_ViewPublic_LogOut', 'log_out');
     } else {
         $this->_checkCsrfFromToken($csrfToken);
         // remove an admin session if we're logged in as the same person
         if (XenForo_Visitor::getInstance()->get('is_admin')) {
             $class = XenForo_Application::resolveDynamicClass('XenForo_Session');
             $adminSession = new $class(array('admin' => true));
             $adminSession->start();
             if ($adminSession->get('user_id') == $userId) {
                 $adminSession->delete();
             }
         }
         $this->getModelFromCache('XenForo_Model_Session')->processLastActivityUpdateForLogOut(XenForo_Visitor::getUserId());
         XenForo_Application::get('session')->delete();
         XenForo_Helper_Cookie::deleteAllCookies($this->_getRetainedCookies(), array('user' => array('httpOnly' => false)));
         XenForo_Visitor::setup(0);
         return $redirectResponse;
     }
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:32,代码来源:Logout.php

示例2: actionIndex

 /**
  * Single-stage logout procedure
  */
 public function actionIndex()
 {
     $this->_checkCsrfFromToken($this->_input->filterSingle('_xfToken', XenForo_Input::STRING));
     // remove an admin session if we're logged in as the same person
     if (XenForo_Visitor::getInstance()->get('is_admin')) {
         $adminSession = new XenForo_Session(array('admin' => true));
         $adminSession->start();
         if ($adminSession->get('user_id') == XenForo_Visitor::getUserId()) {
             $adminSession->delete();
         }
     }
     $this->getModelFromCache('XenForo_Model_Session')->processLastActivityUpdateForLogOut(XenForo_Visitor::getUserId());
     XenForo_Application::get('session')->delete();
     XenForo_Helper_Cookie::deleteAllCookies(array('session'), array('user' => array('httpOnly' => false)));
     XenForo_Visitor::setup(0);
     $redirect = $this->_input->filterSingle('redirect', XenForo_Input::STRING);
     return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, $redirect ? $redirect : XenForo_Link::buildPublicLink('index'));
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:21,代码来源:Logout.php

示例3: logout

 public static function logout()
 {
     self::start();
     if (!self::userLoad()) {
         return;
     }
     if (XenForo_Visitor::getInstance()->get('is_admin')) {
         $adminSession = new XenForo_Session(array('admin' => true));
         $adminSession->start();
         if ($adminSession->get('user_id') == XenForo_Visitor::getUserId()) {
             $adminSession->delete();
         }
     }
     XenForo_Model::create('XenForo_Model_Session')->processLastActivityUpdateForLogOut(XenForo_Visitor::getUserId());
     XenForo_Application::get('session')->delete();
     XenForo_Helper_Cookie::deleteAllCookies(array('session'), array('user' => array('httpOnly' => false)));
     XenForo_Visitor::setup(0);
 }
开发者ID:qexyorg,项目名称:webMCR-1,代码行数:18,代码来源:xenforo.php

示例4: logout

 public function logout()
 {
     // Check if we are an admin
     if ($this->getVisitor()->get('is_admin')) {
         // Logout admin
         $this->adminLogout();
     }
     // Logout user
     XenForo_Model::create('XenForo_Model_Session')->processLastActivityUpdateForLogOut($this->getVisitor()->getUserId());
     $this->getSession()->delete();
     XenForo_Helper_Cookie::deleteAllCookies(array('session'), array('user' => array('httpOnly' => false)));
     $this->getVisitor()->setup(0);
     return true;
 }
开发者ID:nickcuper,项目名称:xenforo-sdk,代码行数:14,代码来源:XenForoSDK.php

示例5: actionLogout

 public function actionLogout()
 {
     $fr_username = $this->_input->filterSingle('fr_username', XenForo_Input::STRING);
     if (XenForo_Visitor::getInstance()->get('is_admin')) {
         $admin = new XenForo_Session(array('admin' => true));
         $admin->start();
         if ($admin->get('user_id') == XenForo_Visitor::getUserId()) {
             $admin->delete();
         }
     }
     fr_remove_push_user();
     $this->getModelFromCache('XenForo_Model_Session')->processLastActivityUpdateForLogOut(XenForo_Visitor::getUserId());
     XenForo_Application::get('session')->delete();
     XenForo_Helper_Cookie::deleteAllCookies(array('session'), array('user' => array('httpOnly' => false)));
     XenForo_Visitor::setup(0);
     $requires_authentication = false;
     if (!XenForo_Visitor::getInstance()->hasPermission('general', 'view')) {
         $requires_authentication = true;
     }
     $options = XenForo_Application::get('options');
     if (!$options->boardActive) {
         $requires_authentication = true;
     }
     return array('success' => true, 'requires_authentication' => $requires_authentication);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:25,代码来源:Login.php


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