From 09ed4545ce8a693ff988b9596e53a2a712c67b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gera=20G=2E=20G=C3=BCiles?= Date: Fri, 5 Apr 2024 21:31:47 +0200 Subject: [PATCH] Fixed problem with groups. --- plugins/setup/schemas/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/setup/schemas/users.js b/plugins/setup/schemas/users.js index 2b299800..f541d1c2 100644 --- a/plugins/setup/schemas/users.js +++ b/plugins/setup/schemas/users.js @@ -99,7 +99,7 @@ NEWACTION('Users/update', { await DATA.check('op.tbl_user').where('email', model.email).where('id', '<>', params.id).where('isremoved=FALSE').error('@(E-mail address is already used)', true).promise($); - var groups = model.groups; + var groups = model.groups || EMPTYARRAY; var iswelcome = model.iswelcome == true; if (model.ispassword) @@ -195,4 +195,4 @@ NEWACTION('Users/logout', { await DATA.remove('op.tbl_session').where('userid', params.id).promise($); $.success(params.id); } -}); \ No newline at end of file +});