當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AuthComponent::logout方法代碼示例

本文整理匯總了PHP中AuthComponent::logout方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthComponent::logout方法的具體用法?PHP AuthComponent::logout怎麽用?PHP AuthComponent::logout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AuthComponent的用法示例。


在下文中一共展示了AuthComponent::logout方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: logout

 /**
  * Logs a user out, and returns the login action to redirect to.
  * Triggers the logout() method of all the authenticate objects, so they can perform
  * custom logout logic.  AuthComponent will remove the session data, so
  * there is no need to do that in an authentication object.  Logging out
  * will also renew the session id.  This helps mitigate issues with session replays.
  *
  * @return string AuthComponent::$logoutRedirect
  * @see AuthComponent::$logoutRedirect
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#logging-users-out
  */
 public function logout()
 {
     if (!empty($this->fields['serial'])) {
         $this->deleteSerial();
     }
     return parent::logout();
 }
開發者ID:baserproject,項目名稱:basercms,代碼行數:18,代碼來源:BcAuthComponent.php

示例2: logout

 /** 
  * Logout execution method.  Initializes CAS client and force logout if required before returning to parent logout method.
  * 
  * @param mixed $url Optional URL to redirect the user to after logout 
  * @return string AuthComponent::$loginAction 
  * @see AuthComponent::$loginAction 
  * @access public 
  */
 function logout()
 {
     // Set debug mode
     phpCAS::setDebug(false);
     //Initialize phpCAS
     phpCAS::client(CAS_VERSION_2_0, Configure::read('CAS.hostname'), Configure::read('CAS.port'), Configure::read('CAS.uri'), true);
     // No SSL validation for the CAS server
     phpCAS::setNoCasServerValidation();
     // Force CAS logout if required
     if (phpCAS::isAuthenticated()) {
         phpCAS::logout(array('url' => 'http://www.cakephp.org'));
         // Provide login url for your application
     }
     return parent::logout();
 }
開發者ID:rajankz,項目名稱:webspace,代碼行數:23,代碼來源:CasAuthComponent+copy.php

示例3: logout

function logout() {
phpCAS::logout();
parent::logout();
}
開發者ID:rajankz,項目名稱:webspace,代碼行數:4,代碼來源:cas.php

示例4: logout

 /**
  * Logs a user out, and returns the login action to redirect to.
  * Triggers the logout() method of all the authenticate objects, so they can perform
  * custom logout logic.  AuthComponent will remove the session data, so
  * there is no need to do that in an authentication object.
  *
  * @param mixed $url Optional URL to redirect the user to after logout
  * @return string AuthComponent::$loginAction
  * @see AuthComponent::$loginAction
  * @link http://book.cakephp.org/view/1262/logout
  */
 public function logout()
 {
     static::$loggedInUser = null;
     return parent::logout();
 }
開發者ID:beyondkeysystem,項目名稱:MongoCake,代碼行數:16,代碼來源:DocumentAuthComponent.php


注:本文中的AuthComponent::logout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。