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

@ -60,7 +60,8 @@ func (mfa *SmsMfa) Enable(user *User) error {
columns = append(columns, "mfa_phone_enabled", "phone", "country_code")
} else if mfa.MfaType == EmailType {
user.MfaEmailEnabled = true
columns = append(columns, "mfa_email_enabled", "email")
user.EmailVerified = true
columns = append(columns, "mfa_email_enabled", "email", "email_verified")
}
_, err := UpdateUser(user.GetId(), user, columns, false)