You are here

function uc_order_user in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \uc_order_user()

Implementation of hook_user().

File

uc_order/uc_order.module, line 419

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 all orders'))) {
        $items['orders'] = array(
          'value' => l(t('Click here to view your order history.'), 'user/' . $account->uid . '/orders'),
          'class' => 'member',
        );
        return array(
          t('Orders') => $items,
        );
      }
  }
}