phpCAS::logoutWithUrl PHP Method

logoutWithUrl() public static method

This method is used to logout from CAS. Halts by redirecting to the CAS server.
Deprecation: The url parameter has been removed from the CAS server as of version 3.3.5.1
public static logoutWithUrl ( string $url ) : void
$url string a URL that will be transmitted to the CAS server
return void
    public static function logoutWithUrl($url)
    {
        trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
        phpCAS::traceBegin();
        if (!is_object(self::$_PHPCAS_CLIENT)) {
            phpCAS::error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
        }
        if (!is_string($url)) {
            phpCAS::error('type mismatched for parameter $url (should be `string\')');
        }
        self::$_PHPCAS_CLIENT->logout(array("url" => $url));
        // never reached
        phpCAS::traceEnd();
    }

Usage Example

示例#1
0
 /**
  * Logout the user form the current symfony application and from the
  *  CAS server
  * @param  boolean $onlyLocal   Set it to true, to logout from the application, but stay login in the CAS
  */
 public function logout($url = null, $onlyLocal = false)
 {
     parent::signOut();
     $this->username = null;
     if (!$onlyLocal) {
         sfCAS::initPhpCAS();
         if (!empty($url)) {
             phpCAS::logoutWithUrl($url);
         } else {
             phpCas::logout();
         }
     }
 }
All Usage Examples Of phpCAS::logoutWithUrl