Instantly share code, notes, and snippets.

Embed
What would you like to do?
SQL: Get all administrators
SELECT u.ID, u.user_login, u.user_nicename, u.user_email FROM wp_users u INNER JOIN wp_usermeta m ON m.user_id = u.ID WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%admin%' ORDER BY u.user_registered
SELECT u.ID, u.user_login, u.user_nicename, u.user_email FROM myprefix_users u INNER JOIN myprefix_usermeta m ON m.user_id = u.ID WHERE m.meta_key = 'myprefix_capabilities' AND m.meta_value LIKE '%admin%' ORDER BY u.user_registered
@wpsmith

This comment has been minimized.

Copy link
Owner Author

wpsmith commented Feb 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment