ביצוע פעולות מקבץ על משתמשים מרובים

סיכום מבוסס בינה מלאכותית

The discussion revolves around the need for batch operations on multiple users in Discourse, particularly for managing spam or migrating users. dandv requests checkbox-based batch actions, such as deletion, similar to topics, to handle spam users from specific domains post-import. codinghorror suggests filtering such users during import instead. dandv agrees but highlights broader use cases, like adjusting trust levels for users with high post counts post-migration. dandv seeks guidance on contributing a PR, noting JS experience but no Ruby knowledge. erlend_sh proposes using the Rails console, and riking provides a Ruby script for bulk user deletion. Moin notes that checkbox-based bulk deletion was already implemented in a recent PR.

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

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

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 לייקים

Checkboxes to bulk delete users were added in
https://github.com/discourse/discourse/pull/29744