feat: fix issue that user email is still unverified after signup (#3685)

This commit is contained in:
DacongDA
2025-03-29 21:24:01 +08:00
committed by GitHub
parent 08f7a05e61
commit e55cd94298
4 changed files with 17 additions and 2 deletions

View File

@ -483,6 +483,14 @@ func (c *ApiController) Login() {
verificationType = "sms"
} else {
verificationType = "email"
if !user.EmailVerified {
user.EmailVerified = true
_, err = object.UpdateUser(user.GetId(), user, []string{"email_verified"}, false)
if err != nil {
c.ResponseError(err.Error(), nil)
return
}
}
}
} else {
var application *object.Application