CAS_Client::isSessionAuthenticated PHP Method

isSessionAuthenticated() public method

This method tells if the current session is authenticated.
public isSessionAuthenticated ( ) : true
return true if authenticated based soley on $_SESSION variable
    public function isSessionAuthenticated()
    {
        return !empty($_SESSION['phpCAS']['user']);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Checks whether authenticated based on $_SESSION. Useful to avoid
  * server calls.
  *
  * @return bool true if authenticated, false otherwise.
  * @since 0.4.22 by Brendan Arnold
  */
 public static function isSessionAuthenticated()
 {
     phpCAS::_validateClientExists();
     return self::$_PHPCAS_CLIENT->isSessionAuthenticated();
 }
CAS_Client