Removes the user from the given group.

@param \Cartalyst\Sentry\Groups\GroupInterface  $group
@return bool
972667
public function removeGroup(GroupInterface $group)
	{
		if ($this->inGroup($group))
		{
			$this->groups()->detach($group);
			$this->invalidateUserGroupsCache();
			$this->invalidateMergedPermissionsCache();
		}

		return true;
	}
1024728
public function delete(Group $group, $userId = null)
    {
        $this->dispatch($group, 'preDelete', [], $userId);

        $this->database->delete('ucms_group')->condition('id', $group->getId())->execute();

        $this->dispatch($group, 'delete', [], $userId);
    }
327115
public function sendGroupsParticipantsRemove($groupId, $participant)
    {
        $msgId = $this->createMsgId();
        $this->sendGroupsChangeParticipants($groupId, $participant, 'remove', $msgId);
    }
1330167
public function removeGroup(GroupInterface $group)
	{
		if ($this->inGroup($group))
		{
			$this->remove('groups', $group);
		}

		return true;
	}
563509
public function removeMembersFromGroupConversation($groupConversationId, array $users)
    {
        $group = $this->find($groupConversationId);

        if ($group) {
            $group->users()->detach($users);

            return true;
        }

        return false;
    }
1039010
public function prune($group = null)
    {
        if ($group) {
            $this->addUsingAlias(GroupTableMap::COL_ID, $group->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
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();
    }
180015
public static function delete($key, $group = NULL)
	{
		$result = FALSE;
		try {
			!self::classExists() or $result = self::instance($group)->delete($key);
		} catch (Cache_Exception $e) {
			self::exception($e);
		}

		return $result;
	}
713164
public function removeFromGroup($sGroupID = null)
    {
        if ($sGroupID != null && $this->inGroup($sGroupID)) {
            $oGroups = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oGroups->init('oxobject2group');
            $sSelect = 'select * from oxobject2group where oxobject2group.oxobjectid = "' . $this->getId() . '" and oxobject2group.oxgroupsid = "' . $sGroupID . '" ';
            $oGroups->selectString($sSelect);
            foreach ($oGroups as $oRemgroup) {
                if ($oRemgroup->delete()) {
                    unset($this->_oGroups[$oRemgroup->oxobject2group__oxgroupsid->value]);
                }
            }
        }
    }
765058
public function userIsMember(AccountInterface $account, Group $group)
    {
        // @todo fix this, cache that
        return (bool)$this
            ->database
            ->query(
                "SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user",
                [':group' => $group->getId(), ':user' => $account->id()]
            )
            ->fetchField()
        ;
    }
984947
public function update(GroupInterface $group)
    {
        $this->em->persist($group);
        $this->em->flush();
        return true;

    }
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;
    }
876533
public function inGroup(GroupInterface $group)
	{
		foreach ($this->getGroups() as $_group)
		{
			if ($_group->getId() == $group->getId())
			{
				return true;
			}
		}

		return false;
	}
509344
public function deleteObjectStateGroup($groupId)
    {
        try {
            return $this->innerGateway->deleteObjectStateGroup($groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
168543
public function deletePausedTriggerGroup($groupName)
    {
        $result = $this->res->getPausedTriggerCol()->deleteOne(['groupName' => $groupName]);

        return $result->isAcknowledged() && $result->getDeletedCount();
    }
377262
public function canDelete(GroupInterface $group, array $parameters)
    {
        $nbrGroupsUsers = $parameters;
        if (!array_key_exists($group->getId(), $nbrGroupsUsers)) {
            $nbrGroupsUsers = $this->userRepository->getCountsUsersByGroups(array($group->getId()));
        }

        return 0 === $nbrGroupsUsers[$group->getId()];
    }
162489
public function hasGroup($group)
    {
        if ($this->user() === null) {
            return null;
        }

        return in_array($group, $this->groups, true);
    }