Is current user a subscriber?

  • Francois
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months ago #27289 by Francois
Is current user a subscriber? was created by Francois
I would like to know if there is a way for me to check if the current user is a subscriber. Using that information, I would like to make the decision whether or not to display a button that would wither say subscribe or one that says Download.

I assume that it is either some PHP code or a plugin, but I could not find any such documentation/feature.

Thanks,

Francois

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

More
11 years 9 months ago #27316 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Is current user a subscriber?
Hi

You can use the php code below :
Code:
require_once JPATH_ROOT.'/components/com_osmembership/helper/helper.php'; $activePlans = OSMembershipHelper::getActiveMembershipPlans(); if (count($activePlans) && $activePlans[0] != 0) { //He is an active subscriber }

Hope this help

Tuan
The following user(s) said Thank You: Francois

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