code: def get_user(request):
      
      if settings.LOCKDOWN and hasattr(request, 'user'):
          if request.user.is_authenticated:
              user = request.user.username
          else:
              # This may happen with crafted requests
              user = ''
      else:
          user = getattr(settings, 'DEFAULT_USER', getpass.getuser())
  
      return user
docs: Returns the users from `request` if authentication is enabled, otherwise
      returns the default user (from settings, or as reported by the OS).