Skip to content

Commit

Permalink
fix: use email change email in identity (#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay authored Feb 14, 2024
1 parent 76a9fe4 commit 4d3b9b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,14 @@ func (a *API) emailChangeVerify(r *http.Request, ctx context.Context, conn *stor
// confirming the email change should create a new email identity if the user doesn't have one
if _, terr = a.createNewIdentity(tx, user, "email", structs.Map(provider.Claims{
Subject: user.ID.String(),
Email: params.Email,
Email: user.EmailChange,
EmailVerified: true,
})); terr != nil {
return terr
}
} else {
if terr := identity.UpdateIdentityData(tx, map[string]interface{}{
"email": params.Email,
"email": user.EmailChange,
"email_verified": true,
}); terr != nil {
return terr
Expand Down

0 comments on commit 4d3b9b8

Please sign in to comment.