• Resolved tirussell

    (@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 6 years, 3 months ago by tirussell.
Viewing 1 replies (of 1 total)
  • Thread Starter tirussell

    (@tirussell)

    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)
  • The topic ‘Get list of all Editors, network-wide’ is closed to new replies.