mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: list staff users within the last month
This commit is contained in:
parent
0cb2b7d603
commit
39983f9d95
@ -174,7 +174,7 @@ end
|
|||||||
desc "List all users which have been staff in the last month"
|
desc "List all users which have been staff in the last month"
|
||||||
task "users:list_recent_staff" => :environment do
|
task "users:list_recent_staff" => :environment do
|
||||||
current_staff_ids = User.human_users.where("admin OR moderator").pluck(:id)
|
current_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_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)
|
recent_moderator_ids = recent_actions.where(action: UserHistory.actions[:revoke_moderation]).pluck(:target_user_id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user