users ECA model¶
Source: eca.eca.users.yml
Purpose: User automations — login behavior, default fields on user forms, pre-save guarantees, post-update reactions.
Events the model listens to¶
| Plugin | Label |
|---|---|
user:login |
User login |
content_entity:prepareform |
Prepare user for form |
content_entity:presave |
Presave user |
form:form_build |
Build user form |
content_entity:update |
Update User |
Entities & contexts touched¶
user- The user's group memberships (read-only in most branches)
Why it exists¶
- Login triggers landing-page routing decisions and may flip lifecycle flags on the user record.
- Prepare/build form injects FedMS-specific defaults — language, name fields, telephony format, profile image fallbacks.
- Pre-save enforces consistency (e.g. lower-case email, populate
field_nameparts when the user supplied only a display name). - Update handles cascading effects of role changes — these often cascade into the task_api model via membership re-evaluation.
Editing notes / gotchas¶
- The user form is shared across the admin UI, the registration form, and the masquerade flow. Test all three after edits.
- Login redirects often interact with
gin_loginandlogin_emailusernameconfiguration. If a redirect breaks, check whether the change belongs here or in those modules' rewrites (seefedmsprofile'srewrite:list). - Don't perform expensive operations on every login — caches, network calls, etc. should be deferred or queued.
Related issues¶
fedms/support#71— Login submit button missing.fedms/components/federation#28— Require users to set their timezone.
See also¶
- task_api — consumes role / membership changes that originate here.
fedmsprofilefedms.info.yml— declares thefield_*storage on users that this model populates.