function theme_privatemsg_realname_username in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 privatemsg_realname/privatemsg_realname.module \theme_privatemsg_realname_username()
- 7 privatemsg_realname/privatemsg_realname.module \theme_privatemsg_realname_username()
Used to theme and display user recipients.
Wrapper for theme_username() with a few additional options.
File
- privatemsg_realname/
privatemsg_realname.module, line 78
Code
function theme_privatemsg_realname_username($recipient, $options) {
if (!isset($recipient->uid)) {
$recipient->uid = $recipient->recipient;
}
if (!empty($options['plain'])) {
$name = theme('username', $recipient, array(
'plain' => TRUE,
));
if (!empty($options['unique'])) {
$identifier = variable_get('privatemsg_realname_unique_identifier', 'name');
$name .= ' [user: ' . $recipient->{$identifier} . ']';
}
return $name;
}
else {
return theme('username', $recipient);
}
}