You are here

function uc_recurring_user in UC Recurring Payments and Subscriptions 6.2

Same name and namespace in other branches
  1. 6 uc_recurring.module \uc_recurring_user()

Implementation of hook_user().

File

./uc_recurring.module, line 275
Allows you to add a recurring fee to a product/SKU to handle subscription type services.

Code

function uc_recurring_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'view':

      // Show only if user is privileged, and there are recurring fees.
      if (uc_recurring_user_access($account)) {
        $account->content['recurring_fee'] = array(
          '#type' => 'user_profile_category',
          '#weight' => -3,
          '#title' => t('Recurring fees'),
          'table' => array(
            '#type' => 'user_profile_item',
            '#value' => l('Click here to view your recurring fees', 'user/' . $account->uid . '/recurring-fees'),
          ),
        );
      }
      break;
  }
}