dont allow duplicate emails (#5452)
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
1002bbb952
commit
e35af29ad0
|
@ -5697,6 +5697,13 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
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
|
||||
db.isMaxType(newuserdomain.limits.maxuseraccounts, 'user', newuserdomain.id, function (maxExceed) {
|
||||
if (maxExceed) {
|
||||
|
|
Loading…
Reference in New Issue