Adds users to a group.

        :param user_ids: One or more user IDs to add
        :param thread_id: Group ID to add people to. See :ref:`intro_threads`
        :type user_ids: list
        :raises: FBchatException if request failed
504141
def addUsersToGroup(self, user_ids, thread_id=None):
        
        thread_id, thread_type = self._getThread(thread_id, None)
        data = self._getSendData(thread_id=thread_id, thread_type=ThreadType.GROUP)

        data["action_type"] = "ma-type:log-message"
        data["log_message_type"] = "log:subscribe"

        user_ids = require_list(user_ids)

        for i, user_id in enumerate(user_ids):
            if user_id == self._uid:
                raise FBchatUserError(
                    "Error when adding users: Cannot add self to group thread"
                )
            else:
                data[
                    "log_message_data[added_participants][{}]".format(i)
                ] = "fbid:{}".format(user_id)

        return self._doSendRequest(data)
450020
def get_users_by_ids(self, user_ids):
        
        urls = [urljoin(self.user_url, F"{i}.json") for i in user_ids]
        result = self._run_async(urls=urls)
        return [User(r) for r in result if r]
88869
def add_user(self, attrs):
        
        username = attrs[self.key]
        if username in self.users:
            raise UserAlreadyExists(username, self.backend_name)
        self.users[username] = attrs
        self.users[username]['groups'] = set([])
934318
def get_user(id)
      return @users[id] if @users.key? id
      user = User.new id
      @users[id] = user
      broadcast(:added, user)
      user
    end
613423
def add_to_group(self, group, user):
        
        data = {'group': group, 'user': user}
        return self.post('addUserToGroup', data)
621976
def add_user(self, user, group):
        
        if self.is_user_in(user, group):
            raise UserAlreadyInAGroup
        self.new_groups.add(group, user)
118949
def prj_add_user(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        dialog = UserAdderDialog(project=self.cur_prj)
        dialog.exec_()
        users = dialog.users
        for user in users:
            userdata = djitemdata.UserItemData(user)
            treemodel.TreeItem(userdata, self.prj_user_model.root)
        self.cur_prj.save()
362022
def add_to_groups(self, username, groups):
        
        self._check_fix_users(username)
        current_groups = self.users[username]['groups']
        new_groups = current_groups | set(groups)
        self.users[username]['groups'] = new_groups
169547
def friends(user_id, options={})
      data = oauth_request("/friend/user/#{user_id}", options)
      Hashie::Mash.new(data["friends"])
    end
232171
def addChildren(self, child_ids):
        

        if not hasattr(child_ids, "__iter__"):
            error_msg = "Input parameter 'child_ids' is not iterable"
            self.log.error(error_msg)
            raise exception.BadValue(error_msg)

        self.log.debug("Try to add children <Workitem %s> to current "
                       "<Workitem %s>",
                       child_ids,
                       self)
        self._addChildren(child_ids)
        self.log.info("Successfully add children <Workitem %s> to current "
                      "<Workitem %s>",
                      child_ids,
                      self)
804390
def add_list_member(self, list_id, user_id):
        
        return List(tweepy_list_to_json(self._client.add_list_member(list_id=list_id, user_id=user_id)))
1060505
protected function add_userids(array $userids) : userlist_base {
        $this->set_userids(array_merge($this->get_userids(), $userids));

        return $this;
    }
290016
def add_user(config, group, username):
        """"""
        client = Client()
        client.prepare_connection()
        group_api = API(client)
        try:
            group_api.add_user(group, username)
        except ldap_tools.exceptions.NoGroupsFound:  # pragma: no cover
            print("Group ({}) not found".format(group))
        except ldap_tools.exceptions.TooManyResults:  # pragma: no cover
            print("Query for group ({}) returned multiple results.".format(
                group))
        except ldap3.TYPE_OR_VALUE_EXISTS:  # pragma: no cover
            print("{} already exists in {}".format(username, group))
413372
def add_to_group(server_context, user_ids, group_id, container_path=None):
    
    return __make_security_group_api_request(server_context, 'addGroupMember.api', user_ids, group_id, container_path)
924476
public void addFriendById(String userId, String name,
			FriendGroup friendGroup) {
		if (name == null && getRiotApi() != null) {
			try {
				name = getRiotApi().getName(userId);
			} catch (final IOException e) {
				e.printStackTrace();
			}
		}
		try {
			connection
					.getRoster()
					.createEntry(
							StringUtils.parseBareAddress(userId),
							name,
							new String[] { friendGroup == null ? getDefaultFriendGroup()
									.getName() : friendGroup.getName() });
		} catch (NotLoggedInException | NoResponseException
				| XMPPErrorException | NotConnectedException e) {
			e.printStackTrace();
		}
	}
804225
def ib_group_member_add(self, group_id, userids):
        '''  '''
        req_hook = 'pod/v1/admin/group/' + group_id + '/membership/add'
        req_args = {'usersListId': userids}
        req_args = json.dumps(req_args)
        status_code, response = self.__rest__.POST_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
21975
def _add_person_to_group(person, group):
    
    from karaage.datastores import add_accounts_to_group
    from karaage.datastores import add_accounts_to_project
    from karaage.datastores import add_accounts_to_institute

    a_list = person.account_set
    add_accounts_to_group(a_list, group)
    for project in group.project_set.all():
        add_accounts_to_project(a_list, project)
    for institute in group.institute_set.all():
        add_accounts_to_institute(a_list, institute)