Step 2. Retrieve information about the current user.
967039
function (req, res, next) {
    var profileUrl = 'https://api.foursquare.com/v2/users/self';
    var params = {
      v: '20140806',
      oauth_token: req.accessToken
    };

    request.get({ url: profileUrl, qs: params, json: true }, function(err, response, profile) {
      if (err) {
        res.status(500).send(err);
        return;
      }
      req.profile = profile.response.user;
      next();
    });
  }
321562
def get_user(self, user_id):
		""""""
		content = self._fetch("/user/%s" % user_id)
		return FastlyUser(self, content)
1096563
def get_user_data(self, subid, params=None):
        ''' 
        '''
        params = update_params(params, {'SUBID': subid})
        return self.request('/v1/server/get_user_data', params, 'GET')
182918
def details(self):
        """"""
        return self.dest_user.profile.details.convert_and_update(
            self.source_profile.details.as_dict
        )
965955
def user_info(self, kv):
        """"""

        key, value = kv
        self.__user_info[key] = value
915691
async def user_info(self, loop=None, **kwargs):
        """"""
        if not self.user_info_url:
            raise NotImplementedError(
                'The provider doesnt support user_info method.')

        data = await self.request('GET', self.user_info_url, loop=loop, **kwargs)
        user = User(**dict(self.user_parse(data)))
        return user, data
700240
def _get_user_info(user=None):
    '''
    
    '''
    if not user:
        # Get user Salt runnining as
        user = __salt__['config.option']('user')

    userinfo = __salt__['user.info'](user)

    if not userinfo:
        if user == 'salt':
            # Special case with `salt` user:
            # if it doesn't exist then fall back to user Salt running as
            userinfo = _get_user_info()
        else:
            raise SaltInvocationError('User {0} does not exist'.format(user))

    return userinfo
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)
1048269
def user_info(self):
        
        account_uri = self.uri.split('/api/v1')[0] + '/account'
        req = self.request(account_uri)
        account_info = req.get()
        user_data = HTMLParser(account_info.content)
        return user_data
190913
def fetchUser(self, username, rawResults = False) :
        """"""
        url = "%s/%s" % (self.URL, username)

        r = self.connection.session.get(url)
        if r.status_code == 200 :
            data = r.json()
            if rawResults :
                return data["result"]
            else :
                u = User(self, data)
                return u
        else :
            raise KeyError("Unable to get user: %s" % username)
39500
def get(self, user_id):
        """"""
        path = '/'.join(['person', user_id])
        return self.rachio.get(path)
45628
def show_user(self, user):
        """"""

        url = '/users/show/%s.xml' % (user)
        d = defer.Deferred()

        self.__downloadPage(url, txml.Users(lambda u: d.callback(u))) \
            .addErrback(lambda e: d.errback(e))

        return d
786387
def get_user_info(apikey, username, password):
    
    user = authenticate(username, password)
    site = Site.objects.get_current()
    return user_structure(user, site)
1046801
def users_view_user(self, ):
        
        i = self.users_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            user = item.internal_data()
            self.view_user(user)
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 {}
1227317
def load_logged_in_user():
    """"""
    user_id = session.get("user_id")
    g.user = User.query.get(user_id) if user_id is not None else None
264743
def get_user(self):
        

        return self.parse_raw_response(requests_util.run_request('get', self.API_BASE_URL + '/user',
                                                                 headers=self.__get_header_with_auth()))