- Posts: 2
- Thank you received: 0
Is current user a subscriber?
- Francois
- Topic Author
- Offline
- New Member
Less
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
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.
- Tuan Pham Ngoc
- Offline
- Administrator
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 :
Hope this help
Tuan
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.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.