Return a specific user's info in LDIF format.
434576
def show(self, username):
        """"""
        filter = ['(objectclass=posixAccount)', "(uid={})".format(username)]
        return self.client.search(filter)
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')
984919
def get_local_user(username):
    """"""
    try:
        _ = getpwnam(username)
        luser = username
    except KeyError:
        luser = getuser()
    return luser
1177058
def GetUserInfo(knowledge_base, user):
  # TODO: This docstring cannot be a raw literal because there are
  # issues with raw unicode literals on Python 2. Once support for Python 2 is
  # dropped, it can be made raw again.
  # pylint: disable=g-docstring-has-escape
  
  # pylint: enable=g-docstring-has-escape
  if "\\" in user:
    domain, user = user.split("\\", 1)
    users = [
        u for u in knowledge_base.users
        if u.username == user and u.userdomain == domain
    ]
  else:
    users = [u for u in knowledge_base.users if u.username == user]

  if not users:
    return
  else:
    return users[0]
28308
def get_user_info(self):
        
        response = self.get_proto(path='/user')
        message = yamcsManagement_pb2.UserInfo()
        message.ParseFromString(response.content)
        return UserInfo(message)
605179
def user_data(self):
        """"""
        if not self._ptr:
            raise BfdException("BFD not initialized")

        return _bfd.get_bfd_attribute(self._ptr, BfdAttributes.USRDATA)
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())
1112864
def _get_user(self, user):
        """"""
        return ' '.join([user.username, user.first_name, user.last_name])
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
284647
def info(gandi, email):
    """"""
    login, domain = email

    output_keys = ['login', 'aliases', 'fallback', 'quota', 'responder']
    mailbox = gandi.mail.info(domain, login)
    output_mailbox(gandi, mailbox, output_keys)

    return mailbox
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
219385
def get_members(self):
        """"""
        res = self.__con__.search_s(
                self.__ldap_base_dn__,
                ldap.SCOPE_SUBTREE,
                "(memberof=%s)" % self.__dn__,
                ['uid'])

        ret = []
        for val in res:
            val = val[1]['uid'][0]
            try:
                ret.append(val.decode('utf-8'))
            except UnicodeDecodeError:
                ret.append(val)
            except KeyError:
                continue

        return [CSHMember(self.__lib__,
                result,
                uid=True)
                for result in ret]
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
39500
def get(self, user_id):
        """"""
        path = '/'.join(['person', user_id])
        return self.rachio.get(path)
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
689377
def get_ad_info(self):
		
		logger.debug('Polling AD for basic info')
		ldap_filter = r'(distinguishedName=%s)' % self._tree
		attributes = MSADInfo.ATTRS
		for entry in self.pagedsearch(ldap_filter, attributes):
			self._ldapinfo = MSADInfo.from_ldap(entry)
			return self._ldapinfo

		logger.debug('Poll finished!')
1184151
def user_parse(data):
        """"""
        _user = data.get('user_info', {})
        _id = _user.get('id') or _user.get('uid')
        yield 'id', _id
        yield 'locale', _user.get('default_lang')
        yield 'username', _user.get('display_name')
        first_name, _, last_name = _user.get('full_name', '').partition(' ')
        yield 'first_name', first_name
        yield 'last_name', last_name
        yield 'picture', 'http://avatars.plurk.com/{0}-big2.jpg'.format(_id)
        city, country = map(lambda s: s.strip(),
                            _user.get('location', ',').split(','))
        yield 'city', city
        yield 'country', country