Get one user or all users
11715
def get(self, request, id):
        
        if id:
            return self._get_one(id)
        else:
            return self._get_all()
78139
public function getUsers()
    {
        if ($this->users === null) {
            $this->setUsers($this->userRepository->getAllByEnvironment($this));
        }
        return $this->users;
    }
971362
def get_user(login, hashes=False):
    '''
    
    '''
    users = list_users(verbose=True, hashes=hashes)
    return users[login] if login in users else {}
367923
def get_user(self, user_id):
        
        if user_id in self._users:
            return self._users.get(user_id)
        else:
            # Load user
            # Save user in cache
            return
391457
def get_valid_users(request):
    "
    users = [get_user(request)]
    if settings.LOCKDOWN and hasattr(request, 'user'):
        if request.user.is_authenticated:
            groups = request.user.groups.all()
            if groups:
                users = list(User.objects.filter(groups__in=groups)
                             .values_list('username', flat=True))
        else:
            # This may happen with crafted requests
            users = []
    return users
608873
def users(options={})
      response = connection.get do |req|
        req.url "users", options
      end
      return_error_or_body(response)
    end
794815
public static function syncAllUsers()
	{
		// @TODO: chunk this to 1000 users at a time

		$db = \App::get('db');

		$query = "SELECT id FROM `#__users`;";

		$db->setQuery($query);

		$result = $db->loadColumn();

		if ($result === false)
		{
			return false;
		}

		foreach ($result as $row)
		{
			self::syncUser($row);

			if (is_array(self::$errors['fatal']) && !empty(self::$errors['fatal'][0]))
			{
				// If there's a fatal error, go ahead and stop
				return self::$errors;
			}
		}

		if (!empty(self::$errors['fatal'][0]) || !empty(self::$errors['warning'][0]))
		{
			return self::$errors;
		}
		else
		{
			return self::$success;
		}
	}
641742
def get_all_users(resource_root, view=None):
  
  return call(resource_root.get, USERS_PATH, ApiUser, True,
      params=view and dict(view=view) or None)
607510
def user(self, user):
        """"""

        resource = self.RUSER + '/' + user
        params = {}

        result = [page for page in self._fetch(resource, params)]

        return result[0]
459451
function getCurrentUser() {
    var fields = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i - 0] = arguments[_i];
    }
    return getCurrentServer().user;
}
341325
def get_user(self, uid):
		""""""
		
		r = requests.get(api_url+'users/'+str(uid)+'/', headers=self.headers)
		print(request_status(r))
		r.raise_for_status()
		return User(r.json())
352685
def get(self, user_ids=None, usernames=None, status=None):
        
        return self.connection.get('user/array',
                                   user_ids=user_ids,
                                   usernames=usernames,
                                   status=status)
59675
def get_by_user(cls, user_id, with_deleted=False):
        """"""
        query = cls.query.filter_by(
            id_user=user_id
        )
        if not with_deleted:
            query = query.filter(cls.deleted_at.is_(None))

        return query.order_by(db.asc(Community.title))
381353
def all(self):
        
        url = self.bitbucket.url('GET_USER', username=self.bitbucket.username)
        response = self.bitbucket.dispatch('GET', url, auth=self.bitbucket.auth)
        try:
            return (response[0], response[1]['repositories'])
        except TypeError:
            pass
        return response
1046473
def get_user_if_exists(strategy, details, user=None, *args, **kwargs):
    """"""
    if user:
        return {'is_new': False}
    try:
        username = details.get('username')

        # Return the user if it exists
        return {
            'is_new': False,
            'user': User.objects.get(username=username)
        }
    except User.DoesNotExist:
        # Fall to the default return value
        pass

    # Nothing to return since we don't have a user
    return {}
67645
def getall(self):
        
        users = self.users_re.findall(self.config, re.M)
        resources = dict()
        for user in users:
            resources.update(self._parse_username(user))
        return resources
1178535
async def get_users(self):
        """"""
        cmd = 'get_users'
        url = self.base_url + cmd
        users = []
        try:
            async with async_timeout.timeout(8, loop=self._loop):
                response = await self._session.get(url)

            logger("Status from Tautulli: " + str(response.status))
            all_user_data = await response.json()
            for user in all_user_data['response']['data']:
                if user['username'] != 'Local':
                    users.append(user['username'])
            self.tautulli_users = users
            logger(self.tautulli_users)

        except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror,
                AttributeError) as error:
            msg = "Can not load data from Tautulli: {} - {}".format(url, error)
            logger(msg, 40)