mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Update webserver.js
Resend email verification email for current user
This commit is contained in:
parent
91e497573f
commit
2cf7072672
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||||
|
@ -8120,4 +8120,4 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue