Could a feature be added that allows all users to be deleted except those belonging to specific groups? (e.g. administrator, anonymous, moderator)..

There was a D6 patch for this #773224, perhaps it would be ported.

Comments

coderintherye’s picture

Title: D7: Delete users by role » D7: Delete users by role via the UI
Component: Code » Documentation

This is done in http://drupal.org/node/1434254

However, I haven't done it for the UI yet, only drush. I'll gladly accept patches though.

boran’s picture

Wow. That drush integration is great, even better than a GUI.

How about having an option to delete "all users except" ROLE1 ROLE2.
i.e. when copying a site from production to test, delete all users except admins moderators.

coderintherye’s picture

Component: Documentation » Code

Yeah, I think that'd be pretty straight-forward.

I'd do it kind of like views does it.
List all the roles as checkboxes. Users with these roles checked will be deleted.
Have also a final checkbox which says "Inverse: Delete users that don't have the checked roles"
Code is fairly straight-forward for that too. Maybe this weekend I could put it in.

avpaderno’s picture

Title: D7: Delete users by role via the UI » Delete users by role via the UI
Issue summary: View changes