You are here

function uc_recurring_subscription_load in UC Recurring Payments and Subscriptions 6.2

Same name and namespace in other branches
  1. 7.2 modules/uc_recurring_subscription/uc_recurring_subscription.module \uc_recurring_subscription_load()

Load a recurring subscription object.

7 calls to uc_recurring_subscription_load()
uc_recurring_subscription_action_grant_og in modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc
Grant user organic groups.
uc_recurring_subscription_action_grant_role in modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc
Grant a role.
uc_recurring_subscription_action_revoke_og in modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc
Revoke user organic groups.
uc_recurring_subscription_action_revoke_role in modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc
Revoke user role(s).
uc_recurring_subscription_nodeapi in modules/uc_recurring_subscription/uc_recurring_subscription.module
For recurring subscriptions we should.

... See full list

File

modules/uc_recurring_subscription/uc_recurring_subscription.module, line 137
Manage subscription/memberships.

Code

function uc_recurring_subscription_load($nid) {
  $subscription = db_fetch_object(db_query("SELECT * FROM {uc_recurring_subscription} WHERE nid = %d", $nid));
  if (!empty($subscription)) {
    $subscription->access = empty($subscription->access) ? array() : unserialize($subscription->access);
  }
  return $subscription;
}