given the user login, looks for a user in assignee list of the repo
        and return it if was found.
554156
def get_assignee(self, login):
        
        if not login:
            return GithubObject.NotSet
        if not hasattr(self, '_assignees'):
            self._assignees = {c.login: c for c in self.repo.get_assignees()}
        if login not in self._assignees:
            # warning
            print("{} doesn't belong to this repo. This issue won't be assigned.".format(login))
        return self._assignees.get(login)
245451
function getObjects(user) {
  var username = (_.isObject(user)) ? user.login : user;
  var isOrg = (_.isObject(user) && user.type === 'Organization');
  var defers = [];

  // Get repos
  defers.push(qG({
    obj: 'repos', method: 'getFromUser', user: username,
    sort: 'created', per_page: 100
  }));

  // Get gists
  defers.push(qG({
    obj: 'gists', method: 'getFromUser', user: username,
    sort: 'created', per_page: 100
  }));

  // Get members (for orgs)
  if (isOrg) {
    defers.push(qG({
      obj: 'orgs', method: 'getMembers', org: username,
      per_page: 100
    }));
  }

  return q.all(defers);
}
789563
def getUserByNumber(self, base, uidNumber):
		
		res = self.query(base, "uidNumber="+str(uidNumber), ['uid'])
		if len(res) > 1:
			raise InputError(uidNumber, "Multiple users found. Expecting one.")
		return res[0][0], res[0][1]['uid'][0]
214026
def get_user(self, login=github.GithubObject.NotSet):
        
        assert login is github.GithubObject.NotSet or isinstance(login, (str, unicode)), login
        if login is github.GithubObject.NotSet:
            return AuthenticatedUser.AuthenticatedUser(self.__requester, {}, {"url": "/user"}, completed=False)
        else:
            headers, data = self.__requester.requestJsonAndCheck(
                "GET",
                "/users/" + login
            )
            return github.NamedUser.NamedUser(self.__requester, headers, data, completed=True)
533991
public boolean matches(GHRepository repo) throws IOException {
        return userName.equals(repo.getOwner().getLogin()) // TODO: use getOwnerName
                && repositoryName.equals(repo.getName())
                && host.equals(repo.getHtmlUrl().getHost());
    }
562513
def star(self, login, repo):
        
        resp = False
        if login and repo:
            url = self._build_url('user', 'starred', login, repo)
            resp = self._boolean(self._put(url), 204, 404)
        return resp
449979
def findUserByVanityName(name)
      method = 'findUser'
      type = User
      args = {:vanityName=>name}
      return_object type,method,args
    end
1282515
function userExists(user) {
  if (_.isEmpty(findUser(user, {refresh: true, throwIfNotFound: false}))) {
    return false;
  } else {
    return true;
  }
}
273617
def find_users(self, *args):
        
        if args:
            names = reduce(lambda query, arg: query |
                (Q(first_name__icontains=arg) | Q(last_name__icontains=arg)),
                args, Q())  # noqa
            users = User.objects.filter(names)
        # If no args given, check every user
        else:
            users = User.objects.all()
        # Display errors if no user was found
        if not users.count() and args:
            if len(args) == 1:
                raise CommandError('No user was found with the name %s' % args[0])
            else:
                arg_list = ', '.join(args)
                raise CommandError('No users found with the names: %s' % arg_list)
        return users
167533
def get_user(self, username):
        
        User = get_user_model()  # noqa
        try:
            user = User.objects.get(**{
                User.USERNAME_FIELD: username,
                'is_active': False
            })
            return user
        except User.DoesNotExist:
            return None
1115577
def with_username(username, password):
    
    user = models.AuthUser.get_by_username(username)
    return _user(user) if user and user.password_matched(password) else None
168950
def get_user(self, user_id, **params):
        """"""
        response = self._get('v2', 'users', user_id, params=params)
        return self._make_api_object(response, User)
480099
def get_users_for_assigned_to():
    
    User = get_user_model()
    return User.objects.filter(is_active=True, is_staff=True)
264429
function getUser(username, done) {
  return getModels(function(m) {
    return m.collections.user.findOne({ username })
      .populate("tokens")
      .populate("groups")
      .populate("leading")
      .exec(done);
  });
}
245196
def check_auth(user):
    '''
    
    '''

    # Initialize authentication
    auth = None
    person = None

    # Check if there is an user
    if user:

        # It means that Django accepted the user and it is active
        if user.is_staff or user.is_superuser:
            # This is an administrator, let it in
            auth = user
        else:
            # It is a normal user, check if there is a person behind
            person = getattr(user, "person", None)
            if not person:
                # Check if there is related one
                person_related = getattr(user, "people", None)
                if person_related:
                    # Must be only one
                    if person_related.count() == 1:
                        person = person_related.get()

            if person and ((person.disabled is None) or (person.disabled > timezone.now())):
                # There is a person, no disabled found or the found one is fine to log in
                auth = user

    # Return back the final decision
    return auth
1365834
def get_user(
        self, identified_with, identifier, req, resp, resource, uri_kwargs
    ):
        """"""
        return self.user
1005251
def guess_user(names = [])
      names << Rugged::Config.global['github.user'] if USE_RUGGED
      names << ENV['USER']
      names.find { |name| name } || (raise 'Failed to guess username')
    end