Removes member from a group.
@param ModelInterface $group
@return PodiumResponse
@throws NoMembershipException
769671
public function leaveGroup(ModelInterface $group): PodiumResponse
    {
        return $this->getPodium()->member->leave($this->ensureMembership(), $group);
    }
1212058
public function removeGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if ($this->groups->contains($group)) {
            $this->groups->removeElement($group);
        }
    }
1135247
public function remove(GroupInterface $group)
    {
        $this->em->remove($group);
        $this->em->flush();
        return true;

    }
546069
public function removeUsersFromGroup(Group $group, array $users)
    {
        foreach ($users as $user) {
            $group->removeUser($user);
            $this->eventDispatcher->dispatch('log', 'Log\LogGroupRemoveUser', array($group, $user));
        }

        $this->om->persist($group);
        $this->om->flush();
    }
592541
public function removeMember($member)
    {
        $member = ($member instanceof Model ? $member->getDn() : $member);

        if (is_null($member)) {
            throw new InvalidArgumentException(
                'Cannot remove member to group. The members distinguished name cannot be null.'
            );
        }

        $mod = $this->newBatchModification(
            $this->schema->member(),
            LDAP_MODIFY_BATCH_REMOVE,
            [$member]
        );

        return $this->addModification($mod)->save();
    }
77019
public function remove_user_from_group($user, $groupid) {
        global $DB;
        require_capability('moodle/course:managegroups', $this->context);
        $group = $this->get_group($groupid);
        if (!groups_remove_member_allowed($group, $user)) {
            return false;
        }
        if (!$group) {
            return false;
        }
        return groups_remove_member($group, $user);
    }
972667
public function removeGroup(GroupInterface $group)
	{
		if ($this->inGroup($group))
		{
			$this->groups()->detach($group);
			$this->invalidateUserGroupsCache();
			$this->invalidateMergedPermissionsCache();
		}

		return true;
	}
1297023
public function removeMember(GroupMemberInterface $member)
    {
        if (!$this->hasMember($member)) {
            throw new \InvalidArgumentException('Trying to remove a member that is not in that group');
        }

        $this->members->removeElement($member);
    }
350468
public function removeMember(PrincipalInterface $principal)
    {

        // query whether or not the passed principal is a member of this group
        if ($this->members->exists($principal->getName())) {
            // remove the princial and return TRUE
            $this->members->remove($principal->getName());
            return true;
        }

        // return FALSE, if not
        return false;
    }
782850
public function remove(ModelInterface $model)
    {
        /** @var DeleteActionHandler $viewHandler */
        $viewHandler = $this->actionHandlers[DeleteActionHandler::class];
        $viewHandler->setView($this->view);
        $viewHandler->setRequest($this->request);
        $viewHandler->setData($model);

        $view = $viewHandler->getView($this->driver);

        return new JsonResponse(array(
            'status' => !$view->getParam('errors'),
            'message' => $view->getParam('message'),
        ));
    }
161087
public function remove(Driver $driver, ModelInterface $model)
    {
        $this->managerFactory->setModelClass(get_class($model));
        $manager = $this->managerFactory->getManager($driver);
        $event = new FilterModelEvent();
        $event->setModel($model);
        $event->setManager($manager);
        $this->eventSubscriber->subscribe(Constants::PRE_DELETE, $event);

        /** @var JsonResponse $response */
        if ($response = $event->getResponse() instanceof JsonResponse) {
            $content = json_decode($response->getContent(), true);
            $this->errorMessage = isset($content['message']) ? $content['message'] : 'message.delete_failed';

            return false;
        }

        try {
            $manager->remove($model);
        } catch (\Exception $exception) {
            $this->errorMessage = 'message.delete_failed';

            return false;
        }

        return true;
    }
543687
public static function ungroup($group)
    {
        if (!static::isValidGroupId($group)) {
            return false;
        }
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_UNGROUP;
        $gateway_data['ext_data'] = $group;
        return static::sendToAllGateway($gateway_data);

    }
1065899
public function removeGroup(\Enhavo\Bundle\NewsletterBundle\Entity\Group $group)
    {
        $this->group->removeElement($group);
    }
984947
public function update(GroupInterface $group)
    {
        $this->em->persist($group);
        $this->em->flush();
        return true;

    }
620923
@Override
    public void deleteGroup(ILockableEntityGroup group) throws GroupsException {
        throwExceptionIfNotInternallyManaged();
        try {
            if (group.getLock().isValid()) {
                removeDeletedGroupFromParentGroups(group);
                deleteGroup((IEntityGroup) group);
            } else {
                throw new GroupsException(
                        "Could not delete group " + group.getKey() + " has invalid lock.");
            }
        } catch (LockingException le) {
            throw new GroupsException("Could not delete group " + group.getKey(), le);
        } finally {
            try {
                group.getLock().release();
            } catch (LockingException le) {
            }
        }
    }
967945
public function unsubscribeThread(ModelInterface $thread): PodiumResponse
    {
        return $this->getPodium()->thread->unsubscribe($this->ensureMembership(), $thread);
    }
1011669
public function addGroup(GroupInterface $group)
    {
        if (!$this->hasGroup($group)) {
            $this->groups->set($group->getName(), $group);
            $group->addUser($this);
        }

        return $this;
    }