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

Display username when logged into emember

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › Display username when logged into emember

Tagged: username

  • This topic has 9 replies, 4 voices, and was last updated 12 years, 10 months ago by digita.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • October 31, 2011 at 12:00 am #4620
    kmk293
    Member

    Is there any way to display the username once they’ve logged in? I have the following code in a text widget in my sidebar:

    <center><?php if(wp_emember_is_member_logged_in()) { ?>
    <font color=red size=3>Wecome, USERNAME

    <?php } ?>

    <?php if(!wp_emember_is_member_logged_in()) { ?>
    <font color=red size=3>Login
    <?php } ?>

    [wp_eMember_login]</center>

    How do i replace “USERNAME” with the actual username? Thanks so much! I appreciate all the support on all your plugins, they work amazingly!

    October 31, 2011 at 9:56 pm #38022
    admin
    Keymaster

    Here is an example:

    global $auth;
    $username = $auth->getUserInfo('user_name');
    echo "Username of the logged in member: ".$username;

    November 1, 2011 at 4:04 am #38023
    kmk293
    Member

    Awesome! I entered that code into my Shortcode Exec PHP plugin and created a [username] shortcode, works perfect thank you!

    November 6, 2011 at 11:31 pm #38024
    kmk293
    Member

    Similar to this, how do I display the user’s email address? Thanks for your support!

    November 7, 2011 at 10:03 pm #38025
    admin
    Keymaster
    global $auth;
    $email = $auth->getUserInfo('email');
    echo "Email address of the logged in member: ".$email;

    November 9, 2011 at 11:50 pm #38026
    kmk293
    Member

    Awesome! Thanks so much!

    August 1, 2012 at 4:14 pm #38027
    memwpent
    Spectator

    Similar to this, how do I display the membership expiry date for a non-recurring membership? Can I use [wp_eMember_user_details user_info=”…”] or do I need to use PHP?

    August 1, 2012 at 11:38 pm #38028
    admin
    Keymaster

    The following shortcode will show the expiry date of the logged in member:

    [wp_eMember_user_details user_info="member_expiry_date"]

    August 7, 2012 at 6:45 pm #38029
    digita
    Member

    what about for showing their membership level?

    Thanks!

    August 7, 2012 at 8:28 pm #38030
    digita
    Member

    nevermind, i found it! thanks!

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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