fix: only update user if we aren't yet verified
This commit is contained in:
parent
b3d63007e1
commit
5c6224222f
|
@ -159,10 +159,12 @@ func (s AccountServiceDefault) VerifyEmail(email string, token string) error {
|
|||
return NewAccountError(ErrKeySecurityInvalidToken, nil)
|
||||
}
|
||||
|
||||
if !verification.User.Verified {
|
||||
err := s.updateAccountInfo(verification.UserID, models.User{Verified: true})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
|
|
Loading…
Reference in New Issue