function theme_privatemsg_username

7-1 privatemsg.theme.inc theme_privatemsg_username($variables)
7-2 privatemsg.theme.inc theme_privatemsg_username($variables)
6-2 privatemsg.theme.inc theme_privatemsg_username($recipient, $options)

Used to theme and display user recipients.

Wrapper for theme_username() with a few additional options.

Related topics

2 string references to the theme hook from theme_privatemsg_username()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

privatemsg_privatemsg_recipient_type_info in ./privatemsg.module
Implements hook_privatemsg_recipient_type_info().
privatemsg_theme in ./privatemsg.module

File

./privatemsg.theme.inc, line 138
Theme functions for privatemsg.

Code

function theme_privatemsg_username($variables) {
  $recipient = $variables['recipient'];
  $options = $variables['options'];
  if (!isset($recipient->uid)) {
    $recipient->uid = $recipient->recipient;
  }
  if (!empty($options['plain'])) {
    $name = strip_tags(format_username($recipient));
    if (!empty($options['unique'])) {
      $name .= ' [user]';
    }
    return $name;
  }
  else {
    return theme('username', array('account' => $recipient));
  }
}