Гость
30 Март 2017 21:32

I would like to do some pho on my site to notify a registered and login in user that they need to subscribe (via Emerald 9) to get more access to pages. I need to know which field I should have the php code check against to verify if it is an active suscriber or not. I've done php for the joomla user file but not in reference to a Emerald file (to check a subscription status)

Here is the code I have used to verify if the user is login in or not in the past as an example:

$user = JFactory::getUser();

if ($user->guest) {
    echo "<p>You must login to see the content. I want your email address.</p>";
} else {

    <h1>Welcome to the site enjoy!!</h1>


}

Please let me know:)

Darren

Последние изменения: 31 Март 2017


Sergey
Total posts: 13,748
31 Март 2017 05:06

This only shows message to none-logged-in users. After login user might be none-subscriber. So you might what to show him a message to encourage a subscription.

Please reffer to restrict anything article.

Работает на Cobalt