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.

  • 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 Dec 11 '14 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 Dec 12 '14 at 2:42

Your Answer

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

Browse other questions tagged or ask your own question.