mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-14 12:01:52 +00:00
dont allow duplicate emails (#5452)
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
1002bbb952
commit
e35af29ad0
1 changed files with 7 additions and 0 deletions
|
@ -5697,6 +5697,13 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(var x in parent.users) {
|
||||||
|
if(parent.users[x].email==command.email){
|
||||||
|
displayNotificationMessage("Email address already in use", "New Account", "ServerNotify");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we exceed the maximum number of user accounts
|
// Check if we exceed the maximum number of user accounts
|
||||||
db.isMaxType(newuserdomain.limits.maxuseraccounts, 'user', newuserdomain.id, function (maxExceed) {
|
db.isMaxType(newuserdomain.limits.maxuseraccounts, 'user', newuserdomain.id, function (maxExceed) {
|
||||||
if (maxExceed) {
|
if (maxExceed) {
|
||||||
|
|
Loading…
Reference in a new issue