At some time our CiviCRM/Drupal installation has had lots of spam accounts created. As these are over a period of time I can't isolate by date. One tell-tail sign that the accounts are spam is their Civi contact summary has no recorded touch points (activity, contributions, memberships and events). Is there a way to search for contacts that meet this criteria and delete? I've looked at the Find Contacts - Advanced Search but there doesn't appear to be an option for null values. I've also looked at modifying one of the Contact Report Templates which does allow null matches but haven't been able to find a setting that gives the spam accounts.
You could find them via groups (or tags) and the custom include/exclude search.
If you have always used CiviCRM for everything then I think you should only need two groups or tags:
- All contacts
- All contacts with activities (as activites are created for contributions, membership and events)
If you have migrated data from a previous system or imported contributions, memberships or event participants then you may need to create groups or use appropriate tags for the all of the following:
- All contacts
- All contacts who have made contributions
- All contacts who have memberships
- All contacts who have registered for events
- All contacts who have activities.
Then go to Search > Custom searches > include/exclude search. You include All contacts and exclude the rest.
You can delete contacts from the results screen.
I have not tried this myself because I would then go to the database directly, but have you tried to achieve this with the search builder?
If you use the Summary Fields extension, then you may have some better search options, such as Lifetime donations <1 etc and be able to use them in a single Advanced Search. I think then you would add them to a Group, and then select that Group and search for Activities to try and find those who might have had some level of engagement such that you do want to keep them.