1

I've a list of 8K+ CiviCRM contacts that have been deemed spam/unwanted. I am looking to clear them from CiviCRM, along with their related Drupal users.

I've found and tested this module: https://www.drupal.org/project/userdelete which will allow me to plug in a list of email addresses, arrived at from joining my list of contacts to the civicrm_uf_match table.

My question is, what is the path of least resistance to handle a clean removal of the CiviCRM contacts?

The API explorer seems to indicate that the contact delete method will only take a single contact id at a time, which would force me to write a module or a rest client to iterate through my list.

Would simply updating the CiviCRM DB directly with is_deleted = 1 do the trick?

I imagine this isn't a new situation...

Thanks in advance for your feedback.

3
  • Have you tried Search functionality such as "Find Contacts", "Advanced Search", etc? You can find delete contact in the action menu. Also see civicrm.stackexchange.com/questions/4518/… Commented Jan 14, 2018 at 4:33
  • The spam contact list has been compiled via some complex logic and conditions directly via SQL query, the list is not something I can just plug in to a basic GUI search.
    – Derek
    Commented Jan 14, 2018 at 22:08
  • You can add a temporary tag / group with an import from their CiviCRM IDs to make them searchable in the GUI. Commented Jan 15, 2018 at 9:18

1 Answer 1

2

Since you are using Drupal, you can install the CiviCRM Entity module, and use Views Bulk Operations to create a View that will delete contacts, or any CiviCRM data in a Drupal Batch API process

1
  • 1
    You'll need the submodule CiviCRM Entity Actions enabled as well Commented Jan 14, 2018 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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