Skip to content

Commit

Permalink
Merge pull request #6908 from Sjlver/update-emailhash
Browse files Browse the repository at this point in the history
When updating emails, change the emailhash too.
  • Loading branch information
NoahTheDuke authored Jul 30, 2023
2 parents 22a6029 + 63bd6a0 commit bfcf784
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/clj/web/auth.clj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
(acknowledged?
(mc/update db "users"
{:username username}
{"$set" {:email email}}))
{"$set" {:email email
:emailhash (md5 email)}}))
(response 200 {:message "Refresh your browser"})

:else
Expand Down

0 comments on commit bfcf784

Please sign in to comment.