Hack to check if a user is a Lifetime subscriber

  • Mark Whitmore
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 8 months ago #148660 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:
<?php if ($user->id > 0): // logged in ?> 

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

More
1 year 8 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:
$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.