summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authormichag86 <micha_g@arcor.de>2015-08-18 20:18:13 +0200
committermichag86 <micha_g@arcor.de>2015-08-18 20:18:13 +0200
commitf84b7907ab247985d71efe36fd5a0fffc713400b (patch)
tree5088a602d4a4904eb3edaaf0d681b100548d0ef7 /settings/ajax
parent69e72eeb37b6d0084c137e1cffffe8717c2f1de0 (diff)
downloadnextcloud-server-f84b7907ab247985d71efe36fd5a0fffc713400b.tar.gz
nextcloud-server-f84b7907ab247985d71efe36fd5a0fffc713400b.zip
do not remove group if it is empty
Sometimes an admin removes a user from a group but he needs the group. This is a big problem if a subadmin removes the last user of a group. He cannot recreate the group
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/togglegroups.php3
1 files changed, 0 insertions, 3 deletions
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index 87b60e485bf..4d248408db0 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -60,9 +60,6 @@ if( OC_Group::inGroup( $username, $group )) {
$error = $l->t("Unable to remove user from group %s", $group);
$success = OC_Group::removeFromGroup( $username, $group );
$usersInGroup=OC_Group::usersInGroup($group);
- if(count($usersInGroup) === 0) {
- OC_Group::deleteGroup($group);
- }
}
else{
$success = OC_Group::addToGroup( $username, $group );