You are here

function uc_recurring_subscription_load in UC Recurring Payments and Subscriptions 7.2

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

Load a recurring subscription object.

10 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_grant_og in modules/uc_recurring_subscription/uc_recurring_subscription.rules.inc
Grant user organic groups.

... See full list

File

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

Code

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