Return data about the given user. Returns None if user
        does not exist.
326610
def get_user_stats(self, name):
        """"""

        req = self.conn.get(BASE_URL + "/user/" + name)
        if req.status_code != 200 or not name:
            return None

        return self.conn.make_api_call("getUserInfo", {"name": name})
167533
def get_user(self, username):
        
        User = get_user_model()  # noqa
        try:
            user = User.objects.get(**{
                User.USERNAME_FIELD: username,
                'is_active': False
            })
            return user
        except User.DoesNotExist:
            return None
743297
def user_info(name, **client_args):
    '''
    
    '''
    matching_users = (user for user in list_users(**client_args)
                      if user.get('user') == name)

    try:
        return next(matching_users)
    except StopIteration:
        pass
601932
def get(self, user_name: str) -> User:
        
        user = current_user()
        if user.is_admin or user.name == user_name:
            return self._get_or_abort(user_name)
        else:
            abort(403)
1220311
def fetch_userid(self, side):
        """"""
        for user in self.users:
            obj = self.users[user]
            if obj.side == side:
                return user
1364331
def query_user_info(user):
    


    try:
        user_info = query_user_page(INIT_URL_USER.format(u=user))
        if user_info:
            logger.info(f"Got user information from username {user}")
            return user_info

    except KeyboardInterrupt:
        logger.info("Program interrupted by user. Returning user information gathered so far...")
    except BaseException:
        logger.exception("An unknown error occurred! Returning user information gathered so far...")

    logger.info(f"Got user information from username {user}")
    return user_info
916241
def user_info(self, verbose=False):
        '''
        
        '''
        url = '{}/{}'.format(self.rest_url, 'user')
        return self.__auth_req_get(url, verbose=verbose)
1212255
def get_user(self, id):
        
        self.assert_has_permission('scim.read')
        return self._get(self.uri + '/Users/%s' % (id))
940338
def hasUser(self):
        
        username = self.getUsername()
        if not username:
            return False
        user = api.get_user(username)
        return user is not None
567175
def get_user(self, user_id):
        
        try:
            return User.objects.get(id=user_id)
        except User.DoesNotExist:
            return None
553901
def get_object(self, queryset=None):
        
        obj = User.objects.get(id=self.request.user.id)
        return obj
221733
def get_user_data_iobject(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.identifier.latest
        except:
            return None
369539
def process_user(ctx, param, value):
    """"""
    if value:
        if value.isdigit():
            user = User.query.get(str(value))
        else:
            user = User.query.filter(User.email == value).one_or_none()
        return 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 {}
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
1309092
def get_user(self, name):
        
        return self._api_get('/api/users/{0}'.format(
            urllib.parse.quote_plus(name)
        ))
224459
def user(self, username=None):
        
        if username is None:
            username = self.__getUsername()

        url = "%s/%s" % (self.root, username)
        return User(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port,
                    initalize=True)