- Posts: 38
- Thank you received: 0
Hack to check if a user is a Lifetime subscriber
- Mark Whitmore
- Topic Author
- Offline
- Junior Member
Less
More
2 years 9 months ago #148660
by Mark Whitmore
Hack to check if a user is a Lifetime subscriber was created by Mark Whitmore
How would one check to see if a user is a Lifetime subscriber from a third party extension?
For example, to check if a user is logged in, one would use the following code:
For example, to check if a user is logged in, one would use the following code:
Code:
<?php if ($user->id > 0): // logged in ?>
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 9 months ago #148661
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hack to check if a user is a Lifetime subscriber
Something like this:
Regards,
Tuan
Code:
$planIds = OSMembershipHelper::getActiveMembershipPlans();
if (in_array(5, $planIds))
{
// He has active subscription of the plan with ID = 5, lifetime subscription
}
Regards,
Tuan
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.