phpCAS::isAuthenticated PHP Method

isAuthenticated() public static method

This method is called to check if the user is authenticated (previously or by tickets given in the URL).
public static isAuthenticated ( ) : true
return true when the user is authenticated.
    public static function isAuthenticated()
    {
        phpCAS::traceBegin();
        phpCAS::_validateClientExists();
        // call the isAuthenticated method of the $_PHPCAS_CLIENT object
        $auth = self::$_PHPCAS_CLIENT->isAuthenticated();
        // store where the authentication has been checked and the result
        self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
        phpCAS::traceEnd($auth);
        return $auth;
    }

Usage Example

Beispiel #1
0
 public static function logout($parameters)
 {
     if (phpCAS::isAuthenticated()) {
         phpCAS::logoutWithRedirectService(OC::$server->getURLGenerator()->getAbsoluteURL(""));
     }
     return true;
 }
All Usage Examples Of phpCAS::isAuthenticated