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 b5b2317d69
commit ae6e26e487
Signed by: moritz
GPG key ID: 1020A035E5DD0824
2 changed files with 42 additions and 0 deletions

View file

@ -187,6 +187,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