fix(user-management): Fix deleting user in hidden group(s)

E.g. guest_users

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
Christoph Wurst 2023-02-03 09:24:48 +01:00 committed by nextcloud-command
parent 94983f6e42
commit 8eb7f01df0
3 changed files with 7 additions and 3 deletions

View file

@ -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 {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long