Support » Networking WordPress » Get list of all Editors, network-wide

  • Resolved tirussell


    How can I get a list of users that have the Editor role on any site within my multisite setup?

    I need to email back-end users an important reminder – but we have LOTS of users that are just subscribers that shouldn’t get this “housekeeping” message.

    One of those things that is probably easy, but apparently hard for me to google – I get lots of results on managing roles, but most don’t just give me a list of users WITH that role.

    • This topic was modified 2 months, 2 weeks ago by  tirussell.
Viewing 1 replies (of 1 total)
  • Found one SQL-only solution:

    SELECT u.ID, u.user_login, u.user_email, u.user_registered, u.display_name, b.path 
    FROM wp_users u
    LEFT JOIN wp_usermeta um ON um.user_id = u.ID
    LEFT JOIN wp_blogs b ON um.meta_key LIKE CONCAT_WS('_', 'wp', b.blog_id, 'capabilities')
    WHERE um.meta_value LIKE '%"administrator"%' OR um.meta_value LIKE '%"editor"%';
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.