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