mirror of
https://github.com/nextcloud/server.git
synced 2024-08-23 17:57:31 +02:00
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:
parent
69e72eeb37
commit
f84b7907ab
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user