This is a relatively advanced question.
We have a WordPress site (more of a CMS than a blog) which has 10,000+ users, some contributors, some just subscribers.
Users "Opt in" or "opt out" to receive messages from us about their accounts. These transactional emails are delivered by another app we have developed, which tracks email bounces and opens.
Last time we emailed all users, over 300 email addresses hard bounced, and we want to remove those users and all posts / comments etc they have left in a manageable way.
so the question is: Is there a way to bulk delete users from a list of email addresses? What would be the best way to achieve this other than searching one-by-one for the address and pressing delete 300+ times?
Just wondering if anyone has done something similar so that we could amend the code for it rather than reinventing the wheel.
We'd want to:
1) Drop in a list of "Bounced" email addresses;
2) For each, Find the WP User account;
3) Delete that account;
4) Delete all posts / comments left by that account;
5) Remove any relationships which may exist relating to that user account.
Any thoughts from the community on this? Or is there a plugin which achieves similar results?