fix: don't send validation email for pending emails

This commit is contained in:
Barış Soner Uşaklı
2025-02-24 12:40:25 -05:00
parent 52b23313a3
commit 07957e8243

View File

@@ -282,6 +282,9 @@ module.exports = function (User) {
if (oldEmail === newEmail) {
return;
}
if (await User.email.isValidationPending(uid, newEmail)) {
return;
}
// 👉 Looking for email change logic? src/user/email.js (UserEmail.confirmByUid)
if (newEmail) {