Batch operations on multiple users

I’ve just migrated from an older forum, and would like to trim down spam users coming from a certain set of domains:

Would be great if there was a way to have checkboexes next to the users (just like with topics), to enable batch operations (mainly, delete).

Generally you do this as part of the import – screening out topics and users you don’t want to arrive – not after the fact.

Most forums are chock full of shell / spam / bogus accounts that should be trimmed before they come in. Which is not too hard since they generally have no posts, either.

1 Like

Agree, for this particular use case. In general, I think batch operations on users would be useful.

Use case: sort users descending by number of posts created, select those above a threshold, and bump their trust level - part of onboarding after a migration.

1 Like

Reviving this topic to see if any other forum admins would have a use for this feature.

If I were to work on a PR, what would be a good start and some directions to follow? I have plenty of JS experience, but no Ruby.

@riking could the rails console come to the rescue again here?

user_list.each do |user|
  UserDestroyer.new(Discourse.system_user).destroy(user, { delete_posts: true, context: 'removing all mail.bg users' } )
end
3 Likes