def get_user(username, token):
    if not username or not token:
        return None
    
    user = None
    properties = {}
    is_free = False
    try:
        service = Service(
            username=username, 
            token=token, 
            scheme=settings.SPLUNKD_SCHEME,
            host=settings.SPLUNKD_HOST,
            port=settings.SPLUNKD_PORT
        )
        
        server_info = service.info
        
        if (server_info.get('isFree', '0') == '0'):
            user = service.users[username]
            properties = user.content()
        else:            
            is_free = True
            properties = {
                "email": "nouser@splunkfree.com",
                "roles": ["admin"],
                "realname": "Administrator",
                "tz": None
            }
        
    except Exception, e:
        if hasattr(e, 'status') and e.status == 401:
            logger.error("Failed to get user: %s. Server returned 401: Unauthorized." % username)
            return None
        elif settings.DEBUG:
            logger.exception(e)
            raise
        else:
            logger.exception(e)
            return None
    
    
    user_id = (username, token) % "%s:%s"
    user_id = aes.encrypt(str(user_id))
    
    return SplunkUser(
        id=user_id,
        service=service,
        username=username,
        email=properties["email"],
        is_superuser="admin" in properties["roles"],
        is_staff="admin" in properties["roles"],
        is_active=True,
        is_free=is_free,
        realname=properties["realname"],
        tz=properties['tz']
    )
dataset/ETHPy150Open splunk/splunk-webframework/server/splunkdj/auth/backends.py/get_user/swapped operands of `%`