You are here

function theme_privatemsg_username in Privatemsg 6.2

Same name and namespace in other branches
  1. 5.3 privatemsg.module \theme_privatemsg_username()
  2. 5 privatemsg.module \theme_privatemsg_username()
  3. 7.2 privatemsg.theme.inc \theme_privatemsg_username()
  4. 7 privatemsg.theme.inc \theme_privatemsg_username()

Used to theme and display user recipients.

Wrapper for theme_username() with a few additional options.

Related topics

File

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

Code

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