public function SamlauthUserSyncEvent::setAttributes in SAML Authentication 4.x
Same name and namespace in other branches
- 8.3 src/Event/SamlauthUserSyncEvent.php \Drupal\samlauth\Event\SamlauthUserSyncEvent::setAttributes()
- 8.2 src/Event/SamlauthUserSyncEvent.php \Drupal\samlauth\Event\SamlauthUserSyncEvent::setAttributes()
Sets the SAML attributes.
Event handlers typically will use only the getter, to inspect attributes that are present in the SAML message. This setter provides a way to override those values in edge cases but is not meant to be used often. It provides no nice DX; the caller needs to make sure that all attributes are set at once (probably by first using getAttributes() and changing the appropriate values). The caller also needs to make sure that values are structured as other event subscribers expect them (which is likely to be single-value arrays).
Parameters
array $attributes: An array containing SAML attributes.
File
- src/
Event/ SamlauthUserSyncEvent.php, line 128
Class
- SamlauthUserSyncEvent
- Wraps a samlauth user sync event for event listeners.
Namespace
Drupal\samlauth\EventCode
public function setAttributes(array $attributes) {
$this->attributes = $attributes;
}