Get a user by ID
513804
def get_user(uid, **kwargs):
    
    user_id=kwargs.get('user_id')
    if uid is None:
        uid = user_id
    user_i = _get_user(uid)
    return user_i
1270887
public function get($id, $args = [])
    {
        if (is_numeric($id) || ! isset($args['by'])) {
            $type = 'ID';
        } else {
            $type = $args['by'];
        }

        $user = get_user_by($type, $id);

        if (! $user) {
            throw new UnexpectedValueException(sprintf('[W616] Could not find user with ID %d', $id));
        }

        return $user;
    }
1242215
function() {
                console.log('iamInterface.user.get');
                corbel.validate.value('id', this.id);
                return this._getUser(corbel.request.method.GET, this.uri, this.id);
            }
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())
1328635
function findById(id, cb) {
  db.getClient(function(err, client, done) {
    client.query(SELECT_ID, [id], function(err, r) {
      var result = r && r.rows[0];
      if(!err && !result) err = new exceptions.NotFound();
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, result);
        done();
      }
    });
  });
}
1365834
def get_user(
        self, identified_with, identifier, req, resp, resource, uri_kwargs
    ):
        """"""
        return self.user
1086942
def get_user(self, key = None):
		'''
		''' 	
		if key:
			uri = self.api_uri + "/users/" + key
		else:
			uri = self.api_uri + "/users/me"

		return self._req('get', uri)
226272
def query_by_id(self, id):
        
        return json.loads(self._get(UrlEncoded(str(id))).body.read().decode('utf-8'))
649559
static function _get_user_by_id( $user_id ) {
            self::$_static_logger->entrance( "user_id = {$user_id}" );

            $users = self::get_all_users();

            if ( is_array( $users ) ) {
                if ( isset( $users[ $user_id ] ) &&
                     $users[ $user_id ] instanceof FS_User &&
                     $user_id == $users[ $user_id ]->id
                ) {
                    return $users[ $user_id ];
                }

                // If user wasn't found by the key, iterate over all the users collection.
                foreach ( $users as $user ) {
                    /**
                     * @var FS_User $user
                     */
                    if ( $user_id == $user->id ) {
                        return $user;
                    }
                }
            }

            return null;
        }
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
798768
def _get_user(session, slug_or_user_id):
        
        user_json_items = session.fetch('users.get', user_ids=slug_or_user_id, fields=User.USER_FIELDS)
        return User.from_json(session, user_json_items[0])
595223
def get(cls, id):
        '''
        
        '''
        client = cls._new_api_client()
        return client.make_request(cls, 'get', url_params={'id': id})
1058574
def get_user(self, user_id):
        
        user_model = get_user_model()
        try:
            return user_model.objects.get(id=user_id)
        except user_model.DoesNotExist:
            return None
1193716
def by_user_name(cls, username):
        """"""
        return DBSession.query(cls).filter_by(user_name=username).first()
981411
function _getIdByUsername(username) {
	const url = `${API}/get-user-id`;
	const params = {
		app: 3,
		username
	};

	return http
		.GET(url, params)
		.then(data => data.user_id);
}
1050769
def request(self, id, **kwargs):
        
        data = self.get('requests', id, **kwargs)
        return data
1027113
def get_user_by_key(id, key, fields = {})
      data = {
          'id' => id,
          'key' => key,
          'fields' => fields
      }
      api_get(:user, data)
    end