public static getAttribute ( string $key ) : mixed | ||
$key | string | attribute name |
return | mixed | string for a single value or an array if multiple values exist. |
public static function getAttribute($key)
{
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->getAttribute($key);
} catch (Exception $e) {
phpCAS::error(get_class($e) . ': ' . $e->getMessage());
}
}
private function setName() { if ($this->config->get('cas-name-attribute-key') !== null && phpCAS::hasAttribute($this->config->get('cas-name-attribute-key'))) { $_SESSION[':cas']['name'] = phpCAS::getAttribute($this->config->get('cas-name-attribute-key')); } else { $_SESSION[':cas']['name'] = $this->getUser(); } }