mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:37:31 +00:00
fix(command): reset phone on phone write model to empty if removed (#3543)
This commit is contained in:
@@ -67,8 +67,12 @@ func (wm *HumanPhoneWriteModel) Reduce() error {
|
||||
wm.CodeExpiry = e.Expiry
|
||||
case *user.HumanPhoneRemovedEvent:
|
||||
wm.State = domain.PhoneStateRemoved
|
||||
wm.IsPhoneVerified = false
|
||||
wm.Phone = ""
|
||||
case *user.UserRemovedEvent:
|
||||
wm.UserState = domain.UserStateDeleted
|
||||
wm.IsPhoneVerified = false
|
||||
wm.Phone = ""
|
||||
}
|
||||
}
|
||||
return wm.WriteModel.Reduce()
|
||||
|
Reference in New Issue
Block a user