Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

WP eMember – Anyway to get specific member details by wordpress user_id

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › WP eMember – Anyway to get specific member details by wordpress user_id

  • This topic has 2 replies, 3 voices, and was last updated 9 years, 4 months ago by admin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 17, 2016 at 1:24 am #12984
    prerana
    Member

    I see wordpress user_id and emember_id are not matching. Is there any way to retrieve emember profile details by using wordpress user_id ?

    if there is no direct way, is there a two steps process of getting member_id first for a given user_id then I can use wp_emember_get_user_details_by_id.

    this is a critical piece of functionality that is missing.

    February 17, 2016 at 1:58 pm #72587
    wzp
    Moderator

    Does any of this help?

    • https://support.tipsandtricks-hq.com/forums/topic/how-to-retrieve-and-show-a-particular-info-of-the-logged-in-member
    • https://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248
    •  

    I see wordpress user_id and emember_id are not matching.

    And they never will. That’s because the ID are really index numbers into 2 different tables. And, because you can have systems in which the number of WordPress and eMember users are different; because they can be 2 totally different sets of people.

    February 18, 2016 at 12:05 am #72588
    admin
    Keymaster

    The username and email address values will always be the same. So you should use those to match the profiles (if you need to).

    If you have the WP User ID then also have the username and email values.

    You can make the following function calls which will return the eMember ID (or false if nothing is found):

    $emember_id = emember_username_exists($user_name);

    OR

    $emember_id = emember_email_exists($email);

    Alternatively, you can use the following code to retrieve the eMember profile given you know the username:

    global $wpdb;
    $query = $wpdb->prepare('SELECT * FROM ' . WP_EMEMBER_MEMBERS_TABLE_NAME . ' WHERE user_name=%s', $user_name);
    $resultset = $wpdb->get_row($query);

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ