You are here

function support_overview_user in Support Ticketing System 6

Same name and namespace in other branches
  1. 7 support_overview/support_overview.module \support_overview_user()

Implementation of hook_user().

File

support_overview/support_overview.module, line 401
support_overview.module

Code

function support_overview_user($type, &$edit, &$account) {
  global $user;
  if (variable_get('support_display_user_links', TRUE)) {
    if ($type == 'view' && (user_access('create tickets', $account) && $user->uid == $account->uid || user_access('administer support'))) {
      $items = array(
        l(t('Overview'), "support/overview/user/{$account->uid}", array(
          'attributes' => array(
            'title' => t("View overview of @username's tickets.", array(
              '@username' => check_plain($account->name),
            )),
          ),
        )),
      );
      $account->content['summary']['support']['#value'] .= theme('item_list', $items);
    }
  }
}