Sync user email to member when changing password (admin_set_password)
All checks were successful
continuous-integration/drone/push Build is passing

Add SyncUserEmailToMember change to admin_set_password so email+password
updates in the user form sync the new email to the linked member.
This commit is contained in:
Moritz 2026-01-27 16:05:50 +01:00
parent d78032d50f
commit 2b4e1e3963
Signed by: moritz
GPG key ID: 1020A035E5DD0824
2 changed files with 42 additions and 0 deletions

View file

@ -194,6 +194,11 @@ defmodule Mv.Accounts.User do
# Use the official Ash Authentication password change
change AshAuthentication.Strategy.Password.HashPasswordChange
# Sync email changes to linked member when email is changed (e.g. form changes both)
change Mv.EmailSync.Changes.SyncUserEmailToMember do
where [changing(:email)]
end
end
# Action to link an OIDC account to an existing password-only user