Support » Fixing WordPress » Export User Metadata

  • Ok, I’ve installed the Usermeta and Userextra plugins, set up fields in the Extended Profile for User addresses, phone numbers etc, and even included a checkbox stating whether they want a newsletter or not like in the screenshot.

    My question is now: how do I get the database to export a list of all the addresses of users who want the newsletter?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Something like

    SELECT user_login,user_email from wp_usermeta
    LEFT JOIN wp_users on wp_users.ID=wp_usermeta.user_id
    WHERE wp_usermeta.meta_key=”newsletter”
    AND wp_usermeta.meta_value=”Yes”

    you might have to change the case of “newsletter” or “Yes”.

    Does anyone have a plugin / php file that would show the extended user details to all users? I’d like to do so on a subscription only site (no public access) which is used for a reunion.

    I think you are looking for something like if you have added a field named address to the extended profile and you would like it to be displayed on your site right?

    If that is correct then you can use something like this to call on the address field

    <?php if($user->address) : ?>
    <p><strong>Contact Info:</strong>
    <br />
    Address: <?php echo $user->address; ?>
    <br />
    <?php endif; ?>

    You would put this in any php document and link to it or even put it in your index or sidebar etc.

    Could anyone plz upload the file (userextra for WP2.0) somewhere so i can download it? I want to download the plugin but the site has been down for days.

    Thanks in advance.

    @miz: thanks!

    Miz, thank you so much! I’ve been wanting to figure this out for months and you finally put the final puzzle piece together for me.

    With this code and your PHP above, I can have a full list of members/users with any data I choose to put in there. Great for member sites and user levels (so not everyone can see everyone’s details, etc.).

    Best regards,

    – Bradley

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Export User Metadata’ is closed to new replies.