A platform for community discussion. Free, open, simple.
FIX: list staff users within the last month
Florian Heidenreich39983f9d951c
diff --git a/lib/tasks/users.rake b/lib/tasks/users.rakeindex 299b799364b..78f4fb6c74a 100644--- a/lib/tasks/users.rake+++ b/lib/tasks/users.rake@@ -174,7 +174,7 @@ enddesc "List all users which have been staff in the last month"task "users:list_recent_staff" => :environment docurrent_staff_ids = User.human_users.where("admin OR moderator").pluck(:id)- recent_actions = UserHistory.where("created_at < ?", 1.month.ago)+ recent_actions = UserHistory.where("created_at > ?", 1.month.ago)recent_admin_ids = recent_actions.where(action: UserHistory.actions[:revoke_admin]).pluck(:target_user_id)recent_moderator_ids = recent_actions.where(action: UserHistory.actions[:revoke_moderation]).pluck(:target_user_id)