mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Allow clearing user account email.
This commit is contained in:
parent
7b902f52e0
commit
6d1f757bfc
2 changed files with 7 additions and 5 deletions
|
@ -1997,8 +1997,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
|
||||
// Validate and change email
|
||||
if (edituserdomain.usernameisemail !== true) {
|
||||
if (common.validateString(command.email, 1, 1024) && (chguser.email != command.email)) {
|
||||
if (command.email == '') { delete chguser.email; } else { chguser.email = command.email.toLowerCase(); }
|
||||
if (common.validateString(command.email, 0, 1024) && (chguser.email != command.email)) {
|
||||
if (command.email == '') { command.emailVerified = false; delete chguser.email; } else { chguser.email = command.email.toLowerCase(); }
|
||||
change = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue