- This topic has 9 replies, 4 voices, and was last updated 12 years, 3 months ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › Display username when logged into emember
Tagged: username
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!
Here is an example:
global $auth;
$username = $auth->getUserInfo('user_name');
echo "Username of the logged in member: ".$username;
Awesome! I entered that code into my Shortcode Exec PHP plugin and created a [username] shortcode, works perfect thank you!
Similar to this, how do I display the user’s email address? Thanks for your support!
global $auth;
$email = $auth->getUserInfo('email');
echo "Email address of the logged in member: ".$email;
Awesome! Thanks so much!
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?
The following shortcode will show the expiry date of the logged in member:
[wp_eMember_user_details user_info="member_expiry_date"]
what about for showing their membership level?
Thanks!
nevermind, i found it! thanks!