Created
April 25, 2019 16:56
-
-
Save KryptikOne/dcc90c167dc800501792a7560556fcf0 to your computer and use it in GitHub Desktop.
Query to get all the users in a WordPress Instance and what role they have.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT user_login,user_email,display_name, SUBSTRING_INDEX(SUBSTRING_INDEX(m.meta_value, ':"', -1), '"', 1) FROM wp_users as u | |
| JOIN wp_usermeta as m | |
| ON u.ID = m.user_id | |
| WHERE m.meta_key = 'wp_capabilities' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment