You are here

function uc_order_user_view in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_order/uc_order.module \uc_order_user_view()

Implements hook_user_view().

File

uc_order/uc_order.module, line 610

Code

function uc_order_user_view($account, $view_mode) {
  global $user;
  if ($user->uid && ($user->uid == $account->uid && user_access('view own orders') || user_access('view all orders'))) {
    $account->content['summary']['orders'] = array(
      '#type' => 'user_profile_item',
      '#title' => t('Orders'),
      '#markup' => l(t('Click here to view your order history.'), 'user/' . $account->uid . '/orders'),
    );
  }
}