You are here

function uc_recurring_user in Ubercart 5

Implementation of hook_user().

File

payment/uc_recurring/uc_recurring.module, line 242
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) {
  global $user;
  switch ($op) {
    case 'view':
      if ($user->uid && ($user->uid == $account->uid || user_access('view all orders'))) {

        // Get a table of recurring fees associated with this user.
        $table = uc_recurring_user_table($account->uid);

        // If fees exist, display them in a table.
        if (!empty($table)) {
          $items['recurring_fees'] = array(
            'value' => $table,
            'class' => 'member',
          );
          return array(
            t('Recurring fees') => $items,
          );
        }
      }
  }
}