Gdn_Session::getAttribute PHP Method

getAttribute() public method

Gets the currently authenticated user's attribute for the specified $AttributeName.
public getAttribute ( unknown_type $AttributeName, string $DefaultValue = false ) : mixed
$AttributeName unknown_type The name of the attribute to get.
$DefaultValue string The default value to return if the attribute does not exist.
return mixed
    public function getAttribute($AttributeName, $DefaultValue = false)
    {
        if (is_array($this->_Attributes)) {
            return val($AttributeName, $this->_Attributes, $DefaultValue);
        }
        return $DefaultValue;
    }