def check_and_ban(resource, type) # toggle between directly banning a user or banning them via their map
      if type == 'map'
        # check and ban a map's author as long as the author is unbanned and non-anonymous
        resource.user.ban unless resource.anonymous? || resource.user.status == User::Status::BANNED
      elsif type == 'user'