Change WordPress user roles and capabilities › Forums › How to or FAQ › Export user names and emails list? › Reply To: Export user names and emails list?
24/09/2018 at 15:26 #5144
Query sample with first and last name for every user:
SELECT users.user_login, users.user_email, users.user_registered, meta1.meta_value as first_name, meta2.meta_value as last_name FROM wp_users users INNER JOIN wp_usermeta as meta1 on meta1.user_id=users.ID and meta1.meta_key='first_name' INNER JOIN wp_usermeta as meta2 on meta2.user_id=users.ID and meta2.meta_key='last_name'