1

How can do a bulk delete of users in Civi? We have too many user accounts in civi and would like to delete may of them and only keep the ones that we need. Instead of looking up the accounts one at a time. I would like to select a group of records and delete them.

Thanks in advance Edward

  • Hi Edward. Just trying to help clear up the terminology. Civi doesn't have 'user' accounts. Those are in your CMS, and it might help if you specify which you use. – petednz - fuzion Oct 14 '15 at 18:00
  • peterdnz, Thanks for responding. Sorry for the confusion. I meant user account. That is users that can log in to civicrm with a user name and password. I did not mean contacts as not all contacts have user accounts. – Edward Oct 14 '15 at 18:57
3

This is actually a Drupal and not a CiviCRM question. A good answer is posted here; an alternate approach is the Bulk User Delete module, but for your use case I think that might not be as easy as some of the answers under the first link.

| improve this answer | |
2

If you mean 'how do I bulk delete contacts', then you can do this via the Advanced Search (or Find Contacts). Find the contacts you want to delete, tick those records, then under Actions you will find Delete Permanently.

If you also want to delete the 'user accounts' then that will depend on the CMS. For example in Drupal, we tend to recommend deleting the Civi contact first, and then finding Drupal users who do not have a uf_match record, and deleting those. We found that making a Drupal View using Bulk Views Operations to facilitate this.

| improve this answer | |
  • peterdnz, Thanks for responding. Sorry for the confusion. I meant user account. That is users that can log in to civicrm with a user name and password. I did not mean contacts as not all contacts have user accounts – Edward Oct 14 '15 at 18:58
  • We are currently using Drupal. – Edward Oct 14 '15 at 18:59
  • Is there a way to use Views Bulk Operations to delete the CMS record and then move the related Civi Record to trash - simultaneously? I built a Drupal view that is giving me the Drupal login/access data and other website info to make sure the contact isn't a contributor, and then linked Civi data into the view. I can determine now they are spam. Can the VBO hit the kill button for both? – Zachary Apr 29 '16 at 16:46
  • Maybe a VBO to delete the user, and a Rules tacked on that says, if Drupal user deleted then trash civi contact - but i don't know if Rules can do that since presumably it doesn't have the information it needs before it is too late. May work if you were okay to set the User to Blocked, and then trigger a Rule to delete both User and Contact ie while you still have both entities in existence? But of course that kind of overrides what Blocked is for but hopefully thinking aloud might trigger some other thoughts from others. do feed back if you come up with something. – petednz - fuzion Apr 29 '16 at 19:52
  • (above should have said, "then trigger a Rule based on USER SET TO BLOCKED to delete ...) – petednz - fuzion Apr 29 '16 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.