add partner_email_sync_portal_login

This commit is contained in:
Luis 2026-10-06 12:10:26 +02:00
parent 3c5809774f
commit 3be3de173e
11 changed files with 388 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# Partner Email Sync Portal Login
When the email of a contact that has a **portal user** is changed and saved:
- the user login is updated with the new (normalized) email, and
- a password reset email is sent to the new address.
A note is posted in the contact chatter with the result.
## Behaviour details
- Only portal users are affected; internal users are never modified.
- Empty or invalid emails are ignored (login is kept).
- Changes that only differ in letter case do not trigger anything.
- If another user already uses the new email as login, the change is
blocked with an error message.
- If the reset email cannot be sent, the login is still updated and the
error is recorded in the chatter.
- From the portal access wizard ("Grant portal access" / "Invite again")
the login is synced but no reset email is sent, since the wizard sends
its own invitation.
- Use the context key `skip_portal_login_sync` to disable the behaviour
(e.g. in imports).
- Changing the login closes the user's open sessions.