From fdf6df4ca8163eeddb4a09c1b8390ad244137a17 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sat, 31 Oct 2020 02:31:42 +0100 Subject: [PATCH] User sync fixes --- modules/account/back/methods/user-account/sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/account/back/methods/user-account/sync.js b/modules/account/back/methods/user-account/sync.js index 3280e9073..1e0ba7f70 100644 --- a/modules/account/back/methods/user-account/sync.js +++ b/modules/account/back/methods/user-account/sync.js @@ -119,8 +119,8 @@ module.exports = Self => { sambaClient } = sync; - // Avoid to change adminitration users - if (['administrator', 'root'].indexOf(userName.toLowerCase()) >= 0) + // Skip conflicting users + if (!userName || ['administrator', 'root'].indexOf(userName.toLowerCase()) >= 0) return; let user = await $.Account.findOne({