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
This commit is contained in:
michag86 2015-08-18 20:18:13 +02:00
parent 69e72eeb37
commit f84b7907ab
1 changed files with 0 additions and 3 deletions

View File

@ -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 );