Skip to content

Commit

Permalink
fix: update the token inserted
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Dec 17, 2024
1 parent efa0f2d commit 409c941
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@ func (a *API) sendEmail(r *http.Request, tx *storage.Connection, u *models.User,
if emailActionType == mail.EmailChangeVerification {
// When secure email change is disabled, we place the token for the new email on emailData.Token
if !config.Mailer.SecureEmailChangeEnabled {
// Token Hash should already be set above
emailData.Token = otpNew
} else {
emailData.TokenNew = otpNew
emailData.TokenHashNew = u.EmailChangeTokenCurrent
emailData.TokenHashNew = tokenHashWithPrefix
}
}
input := hooks.SendEmailInput{
Expand Down

0 comments on commit 409c941

Please sign in to comment.