findUserIds / ////////////////////
503182
async function findInRoleMembership (fieldName, fieldValue, outputField, roleMembershipModel) {
  const results = await roleMembershipModel.find({
    where: {
      memberType: { equals: 'user' },
      [fieldName]: { equals: fieldValue }
    }
  })
  return results.map(r => r[outputField])
}
14647
def lookup_ids(handles):
    
    ids = set()
    for handle_list in [handles[100 * i:100 * i + 100] for i in range(len(handles))]:
        if len(handle_list) > 0:
            while True:
                r = twapi.request('users/lookup', {'screen_name': ','.join(handle_list)})
                if r.status_code in [88, 130, 420, 429]:  # rate limit
                    sys.stderr.write('Sleeping off rate limit for %s: %s\n' % (str(handle_list), r.text))
                    time.sleep(300)
                elif r.status_code == 200:
                    for item in r.get_iterator():
                        ids.add(item['id_str'])
                    break
                else:
                    sys.stderr.write('Error: %s\nSkipping %s...\n' % (str(handle_list), r.text))
                    break

    return ids
254658
public function getIds()
    {
        $ids      = array();
        $iterator = new APCUIterator('user', null, APCU_ITER_KEY);
        foreach ($iterator as $item) {
            $ids[] = $item['key'];
        }

        return $ids;
    }
1062350
def get_current_user_ids(self, db_read=None):
        
        db_read = db_read or self.db_read

        return self.user_ids.using(db_read)
43707
def check_user(user_id, u_pass):
        '''
        
        '''
        user_count = TabMember.select().where(TabMember.uid == user_id).count()
        if user_count == 0:
            return -1
        the_user = TabMember.get(uid=user_id)
        if the_user.user_pass == tools.md5(u_pass):
            return 1
        return 0
840817
public HashIntMap<User> loadUsersFromId (int[] userIds)
        throws PersistenceException
    {
        HashIntMap<User> data = new HashIntMap<User>();
        if (userIds.length > 0) {
            String query = "where userId in (" + genIdString(userIds) + ")";
            for (User user : loadAll(_utable, query)) {
                user.setDirtyMask(_utable.getFieldMask());
                data.put(user.userId, user);
            }
        }
        return data;
    }
340871
public function getIncludeUserIds()
    {
        $userIds = array();
        $roleUsers = $this->role->getUsers();
        foreach ($roleUsers as $user) {
            array_push($userIds, $user->getId());
        }
        $roleGroups = $this->role->getGroups();
        foreach ($roleGroups as $group) {
            $userIds = array_merge($userIds, $group->getUserIds());
        }
        $userIds = array_unique($userIds);

        return $userIds;
    }
136455
@Test
    public void getUniqueGroupIdsForUserInNestedGroup() throws Exception {
        // This test will only be executed when using physical LDAP server
        Assume.assumeTrue(!LDAPUtils.USE_LOCAL_LDAP_SERVER);
        String user = getCN() + nestedUser + getSuffix();
        Log.info(logClass, "getUniqueGroupIdsForUserInNestedGroup", "Checking with a valid user.");
        List<String> list = myServlet.getUniqueGroupIdsForUser(user);
        assertTrue(list.contains(getCN() + topGroup + getSuffix()) && list.contains(getCN() + embeddedGroup + getSuffix()));
        assertEquals("There should be two entries", 2, list.size());
    }
9871
def get_id_from_user(user):
    """"""
    id = r_client.hget('user-id-map', user)
    if id is None:
        id = str(uuid4())
        r_client.hset('user-id-map', user, id)
        r_client.hset('user-id-map', id, user)
    return id
717019
function registrationIds() {
			const ids = [];
			for (const regid of findChildren(sapFioriAppData, "registrationId")) {
				ids.push(regid._);
			}
			return ids.length > 0 ? ids : undefined;
		}
1322115
def get_groups(self, username):
        """"""
        username = ldap.filter.escape_filter_chars(self._byte_p2(username))
        userdn = self._get_user(username, NO_ATTR)

        searchfilter = self.group_filter_tmpl % {
            'userdn': userdn,
            'username': username
        }

        groups = self._search(searchfilter, NO_ATTR, self.groupdn)
        ret = []
        for entry in groups:
            ret.append(self._uni(entry[0]))
        return ret
290172
def _get_id_from_username(self, username):
        
        _mask = "mask[id, username]"
        _filter = {'users': {'username': utils.query_filter(username)}}
        user = self.list_users(_mask, _filter)
        if len(user) == 1:
            return [user[0]['id']]
        elif len(user) > 1:
            raise exceptions.SoftLayerError("Multiple users found with the name: %s" % username)
        else:
            raise exceptions.SoftLayerError("Unable to find user id for %s" % username)
162741
public String getGroupId() {
        List<String> groups = USERS_GROUPS.get(_userId);
        return (groups != null && groups.size() > 0) ? groups.get(0) : null;
    }
926212
def _get_user_id_from_name(self, context_id, user_name):
        """"""
        users = self.zap.users.users_list(context_id)
        for user in users:
            if user['name'] == user_name:
                return user['id']

        raise ZAPError('No user with the name "{0}"" was found for context {1}'.format(user_name, context_id))
442332
public function findUserIdsWithOnlyOneGroup()
    {
        $query = $this->find();
        return $query
            ->select([
                'user_id',
                'group_count' => $query->func()->count('*')
            ])
            ->group('user_id')
            ->having([
                'group_count = 1'
            ])
            ->extract('user_id')
            ->toArray();
    }
1112423
@Override
	int getOldID() {
		int ID_ = getID();

		if (m_userOldestWkid != -1)
			return m_userOldestWkid;

		m_userOldestWkid = Wkid.wkid_to_old(ID_);

		if (m_userOldestWkid != -1)
			return m_userOldestWkid;

		return ID_;
	}
72282
public T allowedUsers(long... userIds) {
        this.userPredicate = (user) -> {
            for (long id : userIds) {
                if (id == user.getId()) {
                    return true;
                }
            }