Return a description of this user.
334875
def Describe(self):
    """"""
    result = ["\nUsername: %s" % self.urn.Basename()]
    labels = [l.name for l in self.GetLabels()]
    result.append("Labels: %s" % ",".join(labels))

    if self.Get(self.Schema.PASSWORD) is None:
      result.append("Password: not set")
    else:
      result.append("Password: set")

    return "\n".join(result)
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))
911262
def describe_guest(userid):
    
    # Check if the guest exists.
    guest_list_info = client.send_request('guest_list')
    userid_1 = (unicode(userid, "utf-8") if sys.version[0] == '2' else userid)

    if userid_1 not in guest_list_info['output']:
        raise RuntimeError("Guest %s does not exist!" % userid)


    guest_describe_info = client.send_request('guest_get_definition_info', userid)
    print("\nThe created guest %s's info are: \n%s\n" % (userid, guest_describe_info))
321562
def get_user(self, user_id):
		""""""
		content = self._fetch("/user/%s" % user_id)
		return FastlyUser(self, content)
75920
def get_user_info(user):
    
    user = api.get_user(user)
    current = api.get_current_user()

    if api.is_anonymous():
        return {
            "username": current.getUserName(),
            "authenticated": False,
            "roles": current.getRoles(),
            "api_url": api.url_for("plone.jsonapi.routes.users", username="current"),
        }

    # nothing to do
    if user is None:
        logger.warn("No user found for {}".format(user))
        return None

    # plone user
    pu = user.getUser()

    info = {
        "username": user.getUserName(),
        "roles": user.getRoles(),
        "groups": pu.getGroups(),
        "authenticated": current == user,
        "api_url": api.url_for("senaite.jsonapi.v1.users", username=user.getId()),
    }

    for k, v in api.get_user_properties(user).items():
        if api.is_date(v):
            v = api.to_iso_date(v)
        if not api.is_json_serializable(v):
            logger.warn("User property '{}' is not JSON serializable".format(k))
            continue
        info[k] = v

    return info
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
705505
def get_user(self, id, **data):
        
        
        return self.get("/users/{0}/".format(id), data=data)
795573
def display_user(value, arg):
    ''' 
    '''
    if value.user == arg and arg.username != ANONYMOUS_USERNAME:
        return "You"
    else:
        return value.user.get_full_name()
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)
822386
def get_by_id(self, id):
        """"""
        user = super(ExtendedUsersService, self).get_by_id(id)
        user.first_name = 'John' + str(id)
        user.last_name = 'Smith' + str(id)
        user.gender = 'male'
        return user
842481
def user_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)
1160796
def get_user_details(self, response):
        
        user = super(DataportenFeideOAuth2, self).get_user_details(response)
        sec_userids = user['userid_sec']
        for userid in sec_userids:
            usertype, username = userid.split(':')
            if usertype == 'feide':
                user['username'] = username
                break
        return user
399450
def get_user(self, user_id=None):
        
        if user_id:
            return self.get('/users/{0}/'.format(user_id))
        return self.get('/users/me/')
1310719
def get_user_details(self, response):
        
        result = {
            'username': response[self.ENV_USERNAME],
            'email': response.get(self.ENV_EMAIL, None),
            'first_name': response.get(self.ENV_FIRST_NAME, None),
            'last_name': response.get(self.ENV_LAST_NAME, None)
        }
        if result['first_name'] and result['last_name']:
            result['fullname']=result['first_name']+' '+result['last_name']
        logger.debug("Returning user details: "+str(result))
        return result
611030
def show_user(self, user):
        
        res = self.post('loadUsers', {'userId': user})
        if isinstance(res, list) and len(res) > 0:
            res = res[0]
        return _fix_user(res)
937156
def get_user_by_id(self, id):
        """"""
        return self.db_adapter.get_object(self.UserClass, id=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())