1

I'm looking for a MySQL query to achieve this purpose:

Change the role of users that never posted and have registered before at least 60 days.

The role to be changed to is a new role to be created named "spam".

After that I'm going to mass delete these users, but I want to check them first by filtering users in that role before I go.

2
  • Is there any particular reason you've specified a mysql command rather than using PHP and the built in APIs, or the WP CLI commands?
    – Tom J Nowell
    Commented Dec 11, 2014 at 23:59
  • 1
    Is there any build-in function to achieve the purpose I mentioned? Or even to list users with the specific criteria?
    – Ahmed Saad
    Commented Dec 12, 2014 at 2:42

0

Your Answer

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

Browse other questions tagged or ask your own question.