Skip to content

Instantly share code, notes, and snippets.

@bi0xid
Created June 12, 2018 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bi0xid/4914be68ae62303da8883c030319a7c8 to your computer and use it in GitHub Desktop.
Save bi0xid/4914be68ae62303da8883c030319a7c8 to your computer and use it in GitHub Desktop.
Get ID, user login, user email, first name and last name from WordPress via SQL
SELECT DISTINCT us.ID, us.user_login, us.user_email, umeta.meta_value, umeta2.meta_value FROM wparl_users as us, wparl_usermeta as umeta, wparl_usermeta as umeta2 WHERE umeta.meta_key = 'first_name' AND umeta2.meta_key = 'last_name' AND umeta.user_id = us.ID AND umeta2.user_id = us.ID AND ( user_email = 'xxxxxx'
OR user_email = 'xxxxxxx'
OR user_email = 'xxxxxxxx');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment