Skip to content

Commit

Permalink
fix email in use meshctrl reply Ylianst#6036
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Apr 18, 2024
1 parent f39b6f8 commit 1747ff7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions meshuser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5792,10 +5792,14 @@ 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");
for (var x in parent.users) {
if (parent.users[x].email == command.email){
if (command.responseid != null) {
obj.send({ action: 'adduser', responseid: command.responseid, result: "Email address already in use", msgid: errid });
} else {
// Send error back, user not found.
displayNotificationMessage("Email address already in use", "New Account", 'ServerNotify', 1, errid, args);
}
return;
}
}
Expand Down

0 comments on commit 1747ff7

Please sign in to comment.