constant SamlauthEvents::USER_SYNC in SAML Authentication 8.3
Same name and namespace in other branches
- 8.2 src/Event/SamlauthEvents.php \Drupal\samlauth\Event\SamlauthEvents::USER_SYNC
- 4.x src/Event/SamlauthEvents.php \Drupal\samlauth\Event\SamlauthEvents::USER_SYNC
Name of the event fired when a user is synchronized from SAML attributes.
The event allows modules to synchronize user account values with SAML attributes passed by the IdP in the authentication response. Basic required properties (username, email) are already synchronized. The event listener method receives a \Drupal\samlauth\Event\SamlauthUserSyncEvent instance. If it changes the account, it should call the event's markAccountChanged() method rather than saving the account by itself.
The event is fired after the SP / samlauth library validates the IdP's authentication response but before the Drupal user is logged in. An event subscriber may throw an exception to prevent the login.
See also
\Drupal\samlauth\Event\SamlauthUserSyncEvent
File
- src/
Event/ SamlauthEvents.php, line 49
Class
- SamlauthEvents
- Defines events for the samlauth module.
Namespace
Drupal\samlauth\EventCode
const USER_SYNC = 'samlauth.user_sync';