function uc_order_user in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_order/uc_order.module \uc_order_user()
Implements hook_user().
File
- uc_order/
uc_order.module, line 573
Code
function uc_order_user($op, &$edit, &$account, $category = NULL) {
global $user;
switch ($op) {
case 'view':
if ($user->uid && ($user->uid == $account->uid && user_access('view own orders') || user_access('view all orders'))) {
$account->content['orders'] = array(
'#type' => 'user_profile_category',
'#weight' => -5,
'#title' => t('Orders'),
'link' => array(
'#type' => 'user_profile_item',
'#value' => l(t('Click here to view your order history.'), 'user/' . $account->uid . '/orders'),
),
);
}
break;
}
}