goss-cleanup 20240601

This commit is contained in:
dsainty 2024-06-17 19:43:09 +10:00
parent 8f63d8534d
commit c481ddc8f0

View File

@ -3,7 +3,6 @@ require File.expand_path("../../../config/environment", __FILE__)
class GossamerForumsCleaner class GossamerForumsCleaner
def perform_cleanup def perform_cleanup
puts "Cleaning up imported users..." puts "Cleaning up imported users..."
# Find all users imported from Gossamer Forums and delete them # Find all users imported from Gossamer Forums and delete them
UserCustomField.where(name: 'original_gossamer_id').each do |field| UserCustomField.where(name: 'original_gossamer_id').each do |field|
user = User.find_by(id: field.user_id) user = User.find_by(id: field.user_id)
@ -78,3 +77,4 @@ class GossamerForumsCleaner
end end
GossamerForumsCleaner.new.perform_cleanup GossamerForumsCleaner.new.perform_cleanup