CAS_Client::hasAttributes PHP Method

hasAttributes() public method

Check whether attributes are available
public hasAttributes ( ) : boolean
return boolean attributes available
    public function hasAttributes()
    {
        // Sequence validation
        $this->ensureAuthenticationCallSuccessful();
        return !empty($this->_attributes);
    }

Usage Example

示例#1
0
文件: CAS.php 项目: DCUnit711/Demeter
 /**
  * Answer true if there are attributes for the authenticated user.
  *
  * @warning should only be called after phpCAS::forceAuthentication()
  * or phpCAS::checkAuthentication().
  *
  * @return bool
  */
 public static function hasAttributes()
 {
     phpCAS::_validateClientExists();
     try {
         return self::$_PHPCAS_CLIENT->hasAttributes();
     } catch (Exception $e) {
         phpCAS::error(get_class($e) . ': ' . $e->getMessage());
     }
 }
CAS_Client