You are here

function theme_ip_username in IP address manager 6

Theme a username for display in the IP tracker.

A modified version of theme_username().

1 theme call to theme_ip_username()
theme_ip_tracker_ip_records in ./ip.module
Theme the IP tracker records for an IP.

File

./ip.module, line 250
IP address manager module.

Code

function theme_ip_username($account) {

  // Shorten the name when it is too long or it will break many tables.
  if (drupal_strlen($account->name) > 20) {
    $name = drupal_substr($account->name, 0, 15) . '...';
  }
  else {
    $name = $account->name;
  }
  $output = l($name, 'user/' . $account->uid . '/ip', array(
    'attributes' => array(
      'title' => t('Manage user IP addresses.'),
    ),
  ));
  return $output;
}