diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-02-03 09:24:48 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-02-03 09:24:48 +0100 |
commit | 84780ffd336971451c7ad0187eb7dbaf12fa0dc4 (patch) | |
tree | 507bab204d62af183dafc3f6d3daf6249f69f58a /apps/settings | |
parent | 94767112dd4210483394b24d4fdaddea92f0dc8b (diff) | |
download | nextcloud-server-84780ffd336971451c7ad0187eb7dbaf12fa0dc4.tar.gz nextcloud-server-84780ffd336971451c7ad0187eb7dbaf12fa0dc4.zip |
fix(user-management): Fix deleting user in hidden group(s)
E.g. guest_users
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/src/store/users.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/settings/src/store/users.js b/apps/settings/src/store/users.js index 8c9e65af29c..e89e5e968da 100644 --- a/apps/settings/src/store/users.js +++ b/apps/settings/src/store/users.js @@ -184,6 +184,10 @@ const mutations = { state.userCount-- // decrement Active Users count user.groups.forEach(userGroup => { const group = state.groups.find(groupSearch => groupSearch.id === userGroup) + if (!group) { + console.warn('User group ' + userGroup + ' does not exist during user removal') + return + } group.usercount-- // decrement group total count }) } else { |