protected function decodeData($authority, ?\SAML2\XML\saml\NameID $nameID, array $attributes): SSOAccountInfo { $info = new SSOAccountInfo('uniname', $cn); ... // eduPersonScopedAffiliation if ( array_key_exists('eduPersonScopedAffiliation', $attributes) && is_array($attributes['eduPersonScopedAffiliation']) && in_array('staff@example.com', $attributes['eduPersonScopedAffiliation']) ) { $info->addFeature(Account::FEATURE_UPLOAD_MEDIA); $info->addFeature(Account::FEATURE_MAILS); } ... }