def get_user_from_request(handler=None, request=None, *args, **kwargs):
 assert (handler or request)
 if (not handler):
  handler = (lambda request, user, *args, **kwargs: user)
 def get_user_from_request_wrapper_fn(request, *args, **kwargs):
  user = (get_object_or_None(FacilityUser, id=request.REQUEST['user']) if ('user' in request.REQUEST) else None)
  user = (user or request.session.get('facility_user'))
  return handler(request, user=user, *args, **kwargs)
 return (get_user_from_request_wrapper_fn if (not request) else get_user_from_request_wrapper_fn(request=request, *args, **kwargs))

def get_user_from_request ( handler = None , request = None , * args , ** kwargs ) : assert ( handler or request ) if ( not handler ) : handler = ( lambda request , user , * args , ** kwargs : user ) def get_user_from_request_wrapper_fn ( request , * args , ** kwargs ) : user = ( get_object_or_None ( FacilityUser , id = request . REQUEST [ 'user' ] ) if ( 'user' in request . REQUEST ) else None ) user = ( user or request . session . get ( 'facility_user' ) ) return handler ( request , user = user , * args , ** kwargs ) return ( get_user_from_request_wrapper_fn if ( not request ) else get_user_from_request_wrapper_fn ( request = request , * args , ** kwargs ) )
gets id of requested user .