Check if user has registered

  • Posts: 1119
  • Thank you received: 114
7 years 10 months ago #259091

Hi,

What code i could use in the emails html version to check if user has registered?
We want to add some text or buttons which should be shown only for registered users?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
7 years 10 months ago #259113

Hello,

Using some code like this through the "preload" file of your email will probably help you :

$vars['CUSTOM_TEXT'] = '';
$user = JFactory::getUser( $data->customer->user_cms_id );
if (!$user->guest) {
$vars['CUSTOM_TEXT'] = 'Your Custom Text for registered users';
}
And then you'll be able to display your custom text through your email HTML file by using that kind of code :
{VAR:CUSTOM_TEXT}

The following user(s) said Thank You: kyratn

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
7 years 10 months ago #259130

Thank you

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum