function uc_recurring_user in UC Recurring Payments and Subscriptions 6
Same name and namespace in other branches
- 6.2 uc_recurring.module \uc_recurring_user()
Implementation of hook_user().
File
- ./
uc_recurring.module, line 266 - 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)) {
$account->content['recurring_fees'] = array(
'#type' => 'user_profile_category',
'#weight' => -3,
'#title' => t('Recurring fees'),
'table' => array(
'#type' => 'user_profile_item',
'#value' => $table,
),
);
}
}
break;
}
}