returns a user by id
16633
def user(id, &callback)
      http(:get, "/users/#{id}.json") do |data, http|
        Firering::User.instantiate(self, data, :user, &callback)
      end
    end
236197
def get_user_by_name(uname,**kwargs):
    
    try:
        user_i = db.DBSession.query(User).filter(User.username==uname).one()
        return user_i
    except NoResultFound:
        return None
1320963
public function find($id): ?User
    {
        foreach ($this->users as $user) {
            if ($user->getId() === $id) {
                return $user;
            }
        }

        return null;
    }
1352901
def by_id(self, id):
        """"""
        path = partial(_path, self.adapter)
        path = path(id)
        return self._get(path)
296567
function findById(id) {
  return db
    .collection(config.get('arangodb:collections:users:name'))
    .document(id)
    .then((user) => {
      user._id = user._key;

      return user;
    })
    .catch({code: 404}, () => null);
}
904576
def created_by(self):
        
        if self.api and self.created_by_id:
            return self.api._get_user(self.created_by_id)
493555
def get_by_id(self, id):
        """"""
        with contextlib.closing(self.database.cursor()) as cursor:
            cursor.execute('SELECT id, name FROM users WHERE id=?', (id,))
            return cursor.fetchone()
1027113
def get_user_by_key(id, key, fields = {})
      data = {
          'id' => id,
          'key' => key,
          'fields' => fields
      }
      api_get(:user, data)
    end
226272
def query_by_id(self, id):
        
        return json.loads(self._get(UrlEncoded(str(id))).body.read().decode('utf-8'))
341176
public User get(int id) {
        Connection conn = null;
        User user = null;
        try {
            conn = ConnectionUtils.getConnection();
            user = userDAO.get(conn,id);
        } catch(SQLException e) {
            logger.error(e.getMessage());
        } finally {
            DbUtils.closeQuietly(conn);
        }
        return user;
    }
993444
def get_by_id(self, id):
        """"""
        return self.user_cls(id=id, password='secret' + str(id))
841837
def _get_one(self, id):
        
        try:
            return self._to_dict(models.User.objects.get(pk=id))
        except models.User.DoesNotExist:
            raise errors.NotFound()
216961
def get_user(self, username):
        

        sql = '''SELECT * FROM user WHERE username = ?'''
        self._db_curs.execute(sql, (username, ))
        user = self._db_curs.fetchone()
        return user
1204899
@Restricted(NoExternalUse.class)
    public User getUser(String id) {
        return User.getById(id, User.ALLOW_USER_CREATION_VIA_URL && hasPermission(Jenkins.ADMINISTER));
    }
351949
def fetch_user(query):
    """"""
    user_filter = {'pk': query} if query.isdigit() else {'username': query}
    user_model = get_user_model()

    try:
        return user_model.objects.get(**user_filter)
    except user_model.DoesNotExist:
        raise exceptions.ParseError("Unknown user: {}".format(query))
99347
def get(self, request, *args, **kwargs):
        """"""
        kwargs['pk'] = request.user.id
        self.kwargs['pk'] = request.user.id
        return super().get(request, *args, **kwargs)
107708
def get_authuser_by_userid(cls, request):
        
        userid = authenticated_userid(request)
        if userid:
            cache_request_user(cls, request, userid)
            return request._user