function privatemsg_recipient_format

7-1 privatemsg.module privatemsg_recipient_format($recipient, $options = array())
7-2 privatemsg.module privatemsg_recipient_format($recipient, $options = array())
6-2 privatemsg.module privatemsg_recipient_format($recipient, $options = array())

Format a single participant.

Parameters

$participant: The participant object to format.

16 calls to privatemsg_recipient_format()
hook_privatemsg_message_validate in ./privatemsg.api.php
Validate a message before it is sent/saved in the database.
pm_block_user_form in pm_block_user/pm_block_user.pages.inc
pm_block_user_form_submit in pm_block_user/pm_block_user.pages.inc
Submit callback for block user confirmation form.
pm_block_user_privatemsg_block_message in pm_block_user/pm_block_user.module
Implements hook_privatemsg_block_message.
privatemsg_autocomplete in ./privatemsg.pages.inc
Return autocomplete results for usernames.

... See full list

File

./privatemsg.module, line 2730
Allows users to send private messages to other users.

Code

function privatemsg_recipient_format($recipient, $options = array()) {
  if (!isset($recipient->type)) {
    $recipient->type = 'user';
    $recipient->recipient = $recipient->uid;
  }
  $type = privatemsg_recipient_get_type($recipient->type);
  if (isset($type['format'])) {
    return theme($type['format'], array('recipient' => $recipient, 'options' => $options));
  }
  return NULL;
}