You are here

function privatemsg_recipient_format in Privatemsg 7.2

Same name and namespace in other branches
  1. 6.2 privatemsg.module \privatemsg_recipient_format()
  2. 7 privatemsg.module \privatemsg_recipient_format()

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
@file User menu callbacks for pm_block_user.module.
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 2780
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;
}