docs: def get_current_user():
      """Get current user object from middleware"""
      thread_local = AutomatedLoggingMiddleware.thread_local
      if hasattr(thread_local, 'current_user'):
          user = thread_local.current_user
          if isinstance(user, AnonymousUser):
              user = None
      else:
          user = None
  
      return user