删除用户接口

@param string $groupId - 用户组id（由数字、字母、下划线组成），长度限制128B
@param string $userId - 用户id（由数字、字母、下划线组成），长度限制128B
@param array $options - 可选参数对象，key: value都为string类型
@description options列表:
@return array
8793
public function deleteUser($groupId, $userId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;
        $data['user_id'] = $userId;

        $data = array_merge($data, $options);

        return $this->request($this->userDeleteUrl, $data);
    }
389589
public function getGroupMember($groupId, $memberId)
	{
		return $this->sendRequest(
			$this->createRequest('GET', sprintf('groups/%d/members/%d', $groupId, $memberId))
		);
	}
1044320
public function getUserGroups(string $userId, array $options = []): array
    {
        $query = $this->find('list', [
            'keyField' => 'id',
            'valueField' => 'name'
        ]);
        $query->matching('Users', function ($q) use ($userId) {
            return $q->where(['Users.id' => $userId]);
        });
        $query->applyOptions($options);

        return $query->toArray();
    }
1290735
public function groupJoin($userId, $groupId, $groupName) {
        try{
            if(empty($userId))
                throw new Exception('被同步群信息的用户 Id 不能为空');
            if(empty($groupId))
                throw new Exception('加入的群 Id 不能为空');
            if(empty($groupName))
                throw new Exception('加入的群 Id 对应的名称不能为空');
            $ret = $this->curl('/group/join',
                array(
                    'userId' => $userId,
                    'groupId' => $groupId,
                    'groupName' => $groupName
                )
            );
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
837043
public function getGroupIds($userId)
    {
        $groups = $this->find()
            ->select(['group_id'])
            ->where(['user_id' => $userId])
            ->hydrate(false)
            ->toArray();

        return Hash::extract($groups, '{n}.group_id');
    }
1357546
public function getCapabilitiesNameForGroup($groupID)
    {
        if (!array_key_exists($groupID, $this->_groupIDCapabilitiesMap)) {
            throw new WURFL_WURFLException("The Group ID " . $groupID . " supplied does not exist");
        }
        return $this->_groupIDCapabilitiesMap [$groupID];
    }
283408
public function findClicksValue(int $groupId, Range $interval): ?Result
	{
		return $this->orm->clickTracking->findClicksByValue($groupId, $interval);
	}
516211
public function changeAllGroups (array $userOpenIDs, $groupID)
    {
        if (count($userOpenIDs) < 1) {
            throw new InvalidArgumentException("At least one user is required.");
        }

        // Build requests.
        $requests = function ($users) use ($groupID) {
            foreach (array_chunk($users, 50) as $chunk) {
                yield new Request(
                    "POST",
                    "https://api.weixin.qq.com/cgi-bin/groups/members/batchupdate",
                    [],
                    json_encode([
                        'openid_list' => $chunk,
                        'to_groupid'  => $groupID,
                    ])
                );
            }
        };

        $failed = [];

        (new Pool(
            $this->client,
            $requests($userOpenIDs),
            [   
                'rejected' => function (RequestException $reason) use (&$failed) {
                    $json = json_decode((string)$reason->getRequest()->getBody());

                    if (isset($json->openid_list)) {
                        $failed = array_merge($failed, $json->openid_list);
                    }
                },
            ]
        ))->promise()->wait();

        return $failed;
    }
586815
public function loadPoliciesByUserId($userId)
    {
        $groupIds = $this->fetchUserGroups($userId);
        $groupIds[] = $userId;

        return $this->loadRolesForContentObjects($groupIds);
    }
1244445
public function loadTypesDataForGroup($groupId, $status)
    {
        try {
            return $this->innerGateway->loadTypesDataForGroup($groupId, $status);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
132603
@Override
	public CPOptionValue fetchCPOptionValueByUuidAndGroupId(String uuid,
		long groupId) {
		return cpOptionValuePersistence.fetchByUUID_G(uuid, groupId);
	}
355326
public function list(string $userId, array $options = []): \Google_Service_Gmail_ListMessagesResponse
    {
        return $this->googleServices->getGoogleServiceGmailForUserId($userId)->users_messages->listUsersMessages($userId, $options);
    }
201324
public function findAllByGroupId( $userGroupId )
    {
        $platform = $this->getDbAdapter()
                         ->getPlatform();

        /* @var $from \Zork\Db\Sql\TableIdentifier */
        $from = $this->getTableInSchema( 'user_right_x_user_group' );

        if ( $from instanceof TableIdentifier )
        {
            $from = $from->getIdentifierChain();
        }
        else
        {
            $from = (array) (string) $from;
        }

        return $this->findAll( array(
            new Expression( $platform->quoteIdentifier( 'id' ) . ' IN (
                SELECT ' . $platform->quoteIdentifier( 'rightId' ) . '
                  FROM ' . $platform->quoteIdentifierChain( $from ) . '
                 WHERE ' . $platform->quoteIdentifier( 'groupId' ) . ' = ?
            )', $userGroupId ),
        ) );
    }
678454
public function groupDelUsers($group_id, $users)
    {
        if (empty($users) || ! is_array($users)) {
            throw new EasemobError('删除的用户不存在，或者提交参数不为数组！');
        }

        $url          = $this->url.'chatgroups/'.$group_id.'/users/'.implode(',', $users);
        $option       = [];
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'DELETE');
    }
398141
public function historyList(string $userId, array $options = []): \Google_Service_Gmail_ListHistoryResponse
    {
        return $this->googleServices->getGoogleServiceGmailForUserId($userId)->users_history->listUsersHistory($userId, $options);
    }
626223
public function getUserOptions(string $id, string $userID): ?array
    {
        $data = Internal\Data::getValue('.temp/bearcms/userthemeoptions/' . md5($userID) . '/' . md5($id) . '.json');
        if ($data !== null) {
            $data = json_decode($data, true);
            if (isset($data['options'])) {
                return $data['options'];
            }
        }
        return null;
    }
898959
public static function update($userId, $id, $params = null, $options = null)
    {
        return self::_userBasedUpdate($userId, $id, $params, $options);
    }