mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Merge pull request #3764 from tunght/master
Fix Resend verification email feature
This commit is contained in:
commit
e3d638b08b
@ -1776,7 +1776,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||||||
} else {
|
} else {
|
||||||
// Check is email already exists
|
// Check is email already exists
|
||||||
obj.db.GetUserWithVerifiedEmail(domain.id, email, function (err, docs) {
|
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
|
// Email already exitst
|
||||||
req.session.messageid = 102; // Existing account with this email address.
|
req.session.messageid = 102; // Existing account with this email address.
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user