How expire mechanism works ?

  • sorrex
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 4 months ago - 8 years 4 months ago #91714 by sorrex
How expire mechanism works ? was created by sorrex
1. I wonder how expire happens. Does it happen automatically based on time even if there is no action on web site (something like cron) or only if an user try to access any content. Is there any description about the mechanism of expiration and renew of subscription. How should I test this behavior in my plugin.

I ask because I need to use Membership Pro for software license manager based on subscription. I develop my own plugin to handle license keys and their expiration on onMembershipActive() and onMembershipExpire() events.

2. I wonder what should I test if I need to know actual expiry date for the plan.
Is it enought to get expire from main plan
Code:
$query->clear() ->select('plan_id, user_id, plan_subscription_status, plan_subscription_to_date') ->from('#__osmembership_subscribers') ->where('plan_main_record = 1') ->where('user_id = ' . $row->user_id); $db->setQuery($query); $rowFields = $db->loadObjectList(); foreach ($rowFields as $rowField) { $expire = $rowField->plan_subscription_to_date; }
Last edit: 8 years 4 months ago by sorrex.

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

More
8 years 4 months ago #91766 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How expire mechanism works ?
Answered via support ticket. Please check your ticket to see my detailed response

Regards,

Tuan

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