mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix(command): reset phone on phone write model to empty if removed (#3543)
This commit is contained in:
parent
8e7f73c6a6
commit
a9f71ba08e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user