From 2cf70726721d0c4f86af70d0ea3684b16b4c18c9 Mon Sep 17 00:00:00 2001 From: tunght Date: Mon, 14 Mar 2022 17:33:43 -0700 Subject: [PATCH] Update webserver.js Resend email verification email for current user --- webserver.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver.js b/webserver.js index 1f87b4d2..6b144ebb 100644 --- a/webserver.js +++ b/webserver.js @@ -1776,7 +1776,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF } else { // Check is email already exists obj.db.GetUserWithVerifiedEmail(domain.id, email, function (err, docs) { - if ((err != null) || (docs.length > 0)) { + if ((err != null) || (docs.length > 0 && docs.find(u => u._id === req.session.cuserid) < 0)) { // Email already exitst req.session.messageid = 102; // Existing account with this email address. } else { @@ -8120,4 +8120,4 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF } return obj; -}; \ No newline at end of file +};