function uc_recurring_get_user_fees in UC Recurring Payments and Subscriptions 7.2
Same name and namespace in other branches
- 6.2 uc_recurring.module \uc_recurring_get_user_fees()
Get an array of recurring fees associated with a user.
Parameters
$order: The order object in question.
$reset: TRUE if the fees cache should be reset.
Return value
An array of recurring fee objects containing all their data from the DB.
2 calls to uc_recurring_get_user_fees()
- theme_uc_recurring_user_table in ./
uc_recurring.module - Displays a table for users to administer their recurring fees.
- uc_recurring_user_access in ./
uc_recurring.module - Restrict access to recurring fee operations for users.
File
- ./
uc_recurring.module, line 953 - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
Code
function uc_recurring_get_user_fees($uid) {
$fees = array();
$result = db_query("SELECT * FROM {uc_recurring_users} WHERE uid = :uid AND status <> :status ORDER BY order_id DESC", array(
':uid' => $uid,
':status' => UC_RECURRING_FEE_STATUS_EXPIRED,
));
foreach ($result as $fee) {
$fees[$fee->rfid] = $fee;
}
return $fees;
}