Set current userΒΆ
Available since: 1.0.0
Provided tokens
| Token | Description |
|---|---|
[account] |
The user entity of the event. Alias: entity |
[event] |
The event. |
[event:machine_name] |
The machine name of the ECA event. |
[session_user] |
The user account that dispatched the event, regardless if ECA is processing models under a different account. This is only available if ECA is configured to always run under a specific account. |
Reacts every time the current user account is set. This wraps the Drupal core
AccountEvents::SET_USER event.
Fires very frequently
This event fires on virtually every request (during session initialization), on login, on logout, and any time the current user is programmatically switched. Use with caution as it can trigger very frequently and may cause performance issues if the ECA model performs expensive operations.
When this event fires during logout, the account being set is the anonymous user (uid 0).