summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-02-03 09:24:48 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-02-03 09:24:48 +0100
commit84780ffd336971451c7ad0187eb7dbaf12fa0dc4 (patch)
tree507bab204d62af183dafc3f6d3daf6249f69f58a /apps/settings
parent94767112dd4210483394b24d4fdaddea92f0dc8b (diff)
downloadnextcloud-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.js4
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 {