get the user details via the cloud
966601
def get_user(self):
        
        log.debug("getting user information from LaMetric cloud...")
        _, url = CLOUD_URLS["get_user"]
        res = self._cloud_session.session.get(url)
        if res is not None:
            # raise an exception on error
            res.raise_for_status()

        return res.json()
696805
def get_user_info(self, request):
        
        user_info = {}

        try:
            ip_address = request.access_route[0]
        except IndexError:
            ip_address = request.remote_addr

        if ip_address:
            user_info['ip_address'] = ip_address

        if not has_flask_login:
            return user_info

        if not hasattr(current_app, 'login_manager'):
            return user_info

        try:
            is_authenticated = current_user.is_authenticated
        except AttributeError:
            # HACK: catch the attribute error thrown by flask-login is not attached
            # >   current_user = LocalProxy(lambda: _request_ctx_stack.top.user)
            # E   AttributeError: 'RequestContext' object has no attribute 'user'
            return user_info

        if callable(is_authenticated):
            is_authenticated = is_authenticated()

        if not is_authenticated:
            return user_info

        user_info['id'] = current_user.get_id()

        if 'SENTRY_USER_ATTRS' in current_app.config:
            for attr in current_app.config['SENTRY_USER_ATTRS']:
                if hasattr(current_user, attr):
                    user_info[attr] = getattr(current_user, attr)

        return user_info
364795
def get_user_by_email(self, email):
		""""""

		call = "/api/users/"+ str(email)

		return self.api_call(call=call, method="GET")
719747
def users_info(self, user_id=None, username=None, **kwargs):
        """"""
        if user_id:
            return self.__call_api_get('users.info', userId=user_id, kwargs=kwargs)
        elif username:
            return self.__call_api_get('users.info', username=username, kwargs=kwargs)
        else:
            raise RocketMissingParamException('userID or username required')
1233993
def fetch_user(app_id, token, ticket, url_detail='https://pswdless.appspot.com/rest/detail'):
    '''
    
    '''
    return FetchUserWithValidation(app_id, token, ticket, url_detail)
1338047
private function get_user() {
        $userid = $this->backuprec->userid;
        $user = core_user::get_user($userid, '*', MUST_EXIST);

        return $user;
    }
777526
def get_user_data(user=None,group=None,data_kind=DINGOS_USER_DATA_TYPE_NAME):
        
        logger.debug("Get user settings called")

        if not user.is_authenticated():
            user = None

        try:
            user_config =  UserData.objects.get(user=user,group=group,data_kind=data_kind)
            return user_config.retrieve()
        except:
            return None
841112
def user_data(self, access_token, *args, **kwargs):
        """"""

        return self.get_json(self.USER_INFO_URL, method="POST", headers=self._get_headers(access_token))
1058263
def get(context, request, username=None):
    
    user_ids = []

    # Don't allow anonymous users to query a user other than themselves
    if api.is_anonymous():
        username = "current"

    # query all users if no username was given
    if username is None:
        user_ids = api.get_member_ids()
    elif username == "current":
        current_user = api.get_current_user()
        user_ids = [current_user.getId()]
    else:
        user_ids = [username]

    # Prepare batch
    size = req.get_batch_size()
    start = req.get_batch_start()
    batch = api.make_batch(user_ids, size, start)

    # get the user info for the user ids in the current batch
    users = map(get_user_info, batch.get_batch())

    return {
        "pagesize": batch.get_pagesize(),
        "next": batch.make_next_url(),
        "previous": batch.make_prev_url(),
        "page": batch.get_pagenumber(),
        "pages": batch.get_numpages(),
        "count": batch.get_sequence_length(),
        "items": users,
    }
1269533
def _get_user(self) -> Dict:
        

        if 'callback_query' in self._update:
            return self._update['callback_query']['from']
        elif 'inline_query' in self._update:
            return self._update['inline_query']['from']
        elif 'message' in self._update:
            return self._update['message']['from']
353801
def get_user(self, name):
        """"""
        users = self.data['users']
        for user in users:
            if user['name'] == name:
                return user
        raise KubeConfError("user name not found.")
705505
def get_user(self, id, **data):
        
        
        return self.get("/users/{0}/".format(id), data=data)
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()))
370495
def get_user_info(self):
        
        try:
            user_id = "org.couchdb.user:"+self.resource.credentials[0]
        except TypeError:
            raise RuntimeError(
                "Please log in before trying to access your user's info"
            )
        status, _, body = self["_users"].resource.get_json(user_id)
        if status != 200:
            raise RuntimeError(
                "Failed to get user info"
            )
        return body
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())
1026323
def get(method, hmc, uri, uri_parms, logon_required):
        """"""
        query_str = uri_parms[0]
        try:
            console = hmc.consoles.lookup_by_oid(None)
        except KeyError:
            raise InvalidResourceError(method, uri)
        result_users = []
        filter_args = parse_query_parms(method, uri, query_str)
        for user in console.users.list(filter_args):
            result_user = {}
            for prop in user.properties:
                if prop in ('object-uri', 'name', 'type'):
                    result_user[prop] = user.properties[prop]
            result_users.append(result_user)
        return {'users': result_users}
1070470
def get_user(self, username):
        """"""
        ret = {}
        tmp = self._get_user(self._byte_p2(username), ALL_ATTRS)
        if tmp is None:
            raise UserDoesntExist(username, self.backend_name)
        attrs_tmp = tmp[1]
        for attr in attrs_tmp:
            value_tmp = attrs_tmp[attr]
            if len(value_tmp) == 1:
                ret[attr] = value_tmp[0]
            else:
                ret[attr] = value_tmp
        return ret