mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-05 22:52:46 +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
|
wm.CodeExpiry = e.Expiry
|
||||||
case *user.HumanPhoneRemovedEvent:
|
case *user.HumanPhoneRemovedEvent:
|
||||||
wm.State = domain.PhoneStateRemoved
|
wm.State = domain.PhoneStateRemoved
|
||||||
|
wm.IsPhoneVerified = false
|
||||||
|
wm.Phone = ""
|
||||||
case *user.UserRemovedEvent:
|
case *user.UserRemovedEvent:
|
||||||
wm.UserState = domain.UserStateDeleted
|
wm.UserState = domain.UserStateDeleted
|
||||||
|
wm.IsPhoneVerified = false
|
||||||
|
wm.Phone = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return wm.WriteModel.Reduce()
|
return wm.WriteModel.Reduce()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user