Return info about user.
500191
async def cmd_id(message: types.Message):
    
    if message.reply_to_message:
        target = message.reply_to_message.from_user
        chat = message.chat
    elif message.forward_from and message.chat.type == ChatType.PRIVATE:
        target = message.forward_from
        chat = message.forward_from or message.chat
    else:
        target = message.from_user
        chat = message.chat

    result_msg = [hbold('Info about user:'),
                  f"First name: {target.first_name}"]
    if target.last_name:
        result_msg.append(f"Last name: {target.last_name}")
    if target.username:
        result_msg.append(f"Username: {target.mention}")
    result_msg.append(f"User ID: {target.id}")

    result_msg.extend([hbold('Chat:'),
                       f"Type: {chat.type}",
                       f"Chat ID: {chat.id}"])
    if chat.type != ChatType.PRIVATE:
        result_msg.append(f"Title: {chat.title}")
    else:
        result_msg.append(f"Title: {chat.full_name}")
    return SendMessage(message.chat.id, '\n'.join(result_msg), reply_to_message_id=message.message_id,
                       parse_mode=ParseMode.HTML)
705505
def get_user(self, id, **data):
        
        
        return self.get("/users/{0}/".format(id), data=data)
357951
def user(self):
        """"""
        try:
            return self._user
        except AttributeError:
            self._user = MatrixUser(self.mxid, self.Api(identity=self.mxid))
            return self._user
763012
def describe_users(self, users_filter=None):
        """"""
        user_list = Users(oktypes=User)
        for user in self._user_list:
            if users_filter and (users_filter.get('name') == user.name or users_filter.get('uid') == user.uid):
                user_list.append(user)
        return user_list
48184
def get_user_brief():
    """"""
    client = get_user_api()

    with catch_raise_api_exception():
        data, _, headers = client.user_self_with_http_info()

    ratelimits.maybe_rate_limit(client, headers)
    return data.authenticated, data.slug, data.email, data.name
890532
async def user_info(self, params=None, **kwargs):
        """"""
        params = params or {}
        params[
            'fields'] = 'id,email,first_name,last_name,name,link,locale,' \
                        'gender,location'
        return await super(FacebookClient, self).user_info(params=params, **kwargs)
1117639
def _get_user(self, username, attrs=ALL_ATTRS):
        """"""

        username = ldap.filter.escape_filter_chars(username)
        user_filter = self.user_filter_tmpl % {
            'username': self._uni(username)
        }
        r = self._search(self._byte_p2(user_filter), attrs, self.userdn)

        if len(r) == 0:
            return None

        # if NO_ATTR, only return the DN
        if attrs == NO_ATTR:
            dn_entry = r[0][0]
        # in other cases, return everything (dn + attributes)
        else:
            dn_entry = r[0]
        return dn_entry
1291067
def find_users(session, *usernames):
    """"""
    user_string = ','.join(usernames)
    return _make_request(session, FIND_USERS_URL, user_string)
607510
def user(self, user):
        """"""

        resource = self.RUSER + '/' + user
        params = {}

        result = [page for page in self._fetch(resource, params)]

        return result[0]
591743
def user_info(self, username):
        
        request_url = "{}/api/0/user/{}".format(self.instance, username)

        return_value = self._call_api(request_url)

        return return_value
274819
def get_userinfo(self, access_token, id_token, payload):
        """"""

        user_response = requests.get(
            self.OIDC_OP_USER_ENDPOINT,
            headers={
                'Authorization': 'Bearer {0}'.format(access_token)
            },
            verify=self.get_settings('OIDC_VERIFY_SSL', True))
        user_response.raise_for_status()
        return user_response.json()
280437
def get_user_details(self, response):
        """"""

        account = response['account']
        metadata = json.loads(account.get('json_metadata') or '{}')
        account['json_metadata'] = metadata

        return {
            'id': account['id'],
            'username': account['name'],
            'name': metadata.get("profile", {}).get('name', ''),
            'account': account,
        }
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 {}
801257
def user(self, username=None):
        """"""
        if username is None:
            username = self.__getUsername()
        parsedUsername = urlparse.quote(username)
        url = self.root + "/%s" % parsedUsername
        return User(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port,
                    initialize=False)
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())
893900
def get_user_info(self):
        
        # the request is done in behalf of the current logged in user
        resp = self.requester.get(
            urljoin(
                self.base_url,
                '/api/mobile/v0.5/my_user_info'
            )
        )

        resp.raise_for_status()

        return Info(resp.json())
1041933
def _get_user_info(self, cmd, section, required=True,
        accept_just_who=False):
        """"""
        line = self.next_line()
        if line.startswith(section + b' '):
            return self._who_when(line[len(section + b' '):], cmd, section,
                accept_just_who=accept_just_who)
        elif required:
            self.abort(errors.MissingSection, cmd, section)
        else:
            self.push_line(line)
            return None