Display Member Since text

Hello,
I’m trying to display a text in each user profile “Member Since: DATE” . This text it’s supposed to be displayed in a public page, and it’s for other members to see, when they visit that user profile.

I start by using:

<?php echo "Member Since: " . date('M j, Y', S2MEMBER_CURRENT_USER_REGISTRATION_TIME); ?>

but what this returns it’s the registration date from the user that is login. So every profile I check it gives me MY registration date and not from the user I’m seeing.

Any thoughts?

Thanks in advance
Regards

No one can help?

It’s even possible?

Thank you

@CarlSaint:

You could use [s2Get/] or get_user_field() with a specific User ID. You’d need to retrieve the User ID for the user whose profile is being displayed prior to calling the code to display the registration date.

See this s2Member KBA: http://s2member.com/kb-article/s2get-shortcode-documentation/

@CarlSaint - were you able to figure this out? I’m looking to do the exact same thing.

Hi Gigi.

You could do something like this:

$user_id = 1854;
$user = get_userdata($user_id);
$user_reg_time = (int)strtotime($user->user_registered);
echo 'Member Since: ' . date('M j, Y', $user_reg_time);

:slight_smile: