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

How to Retrieve and Show Details of a Specific Member

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember F.A.Q/Instructions › How to Retrieve and Show Details of a Specific Member

Tagged: display member info, emember api, get member data, member data, members, wp membership

  • This topic has 0 replies, 1 voice, and was last updated 11 years, 6 months ago by admin.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • October 26, 2013 at 1:20 am #9904
    admin
    Keymaster

    Using Shortcode

    You can display particular information of a member using the “wp_eMember_user_details” shortcode.

    The following example will show you how to display a particular member’s email. The “email” parameter can be changed to any other member details attribute to show that particular info:

    [wp_eMember_user_details user_info="email" member_id="1"]

    The “member_id” parameter value (example: 1) is the ID of the user that you want to show the info of.

    More examples

    Here are some example shortcodes that will show various info of the member whose ID is 1

    The following will show the username:

    [wp_eMember_user_details user_info="user_name" member_id="1"]

    The following will show the firstname:

    [wp_eMember_user_details user_info="first_name" member_id="1"]

    The following will show the lastname:

    [wp_eMember_user_details user_info="last_name" member_id="1"]

    The following will show the account status:

    [wp_eMember_user_details user_info="account_state" member_id="1"]

    The following will show the expiry date:

    [wp_eMember_user_details user_info="member_expiry_date" member_id="1"]

    Retrieve Member Details Using PHP

    Use the following function to retrieve field value of a particular member:

    wp_emember_get_user_details_by_id($field_name, $member_id)

    Below is an example that will retrieve the username of the member whose ID is 1:

    $field_name = 'user_name';
    $member_id = '1';
    $value = wp_emember_get_user_details_by_id($field_name, $member_id);
    echo 'Username is: ' . $value ;

    Here is another example that will retrieve the email address of the member whose ID is 1:

    $field_name = 'email';
    $member_id = '1';
    $value = wp_emember_get_user_details_by_id($field_name, $member_id);
    echo 'Email is: ' . $value ;

    Also, take a look at the following documentation which has many useful example codes:

    http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248

    Available default field name attributes

    Below is a list of available field name attributes (excluding custom fields) that you can use with this shortcode or PHP function:

    user_name, first_name,last_name,email,phone, address_street, address_state, address_zipcode, address_city, member_since,membership_level,account_state,home_page,

    country, gender,subscription_starts,company_name, user_membership_level_name,

    user_additional_membership_level_names, profile_picture_src,

    member_expiry_date.

    Retrieving and Showing the Details of Currently Logged-In Member

    Check the following post:

    https://support.tipsandtricks-hq.com/forums/topic/how-to-retrieve-and-show-a-particular-info-of-the-logged-in-member

  • Author
    Posts
Viewing 1 post (of 1 total)
  • The topic ‘How to Retrieve and Show Details of a Specific Member’ is closed to new replies.

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