function privatemsg_recipient_key

7-1 privatemsg.module privatemsg_recipient_key($recipient)
7-2 privatemsg.module privatemsg_recipient_key($recipient)
6-2 privatemsg.module privatemsg_recipient_key($recipient)

Return key for a recipient object used for arrays.


$recipient: Recipient object, must have type and recipient properties.

Return value

A string that looks like type_id.

Related topics

17 calls to privatemsg_recipient_key()
pm_block_user_privatemsg_block_message in pm_block_user/pm_block_user.module
Implements hook_privatemsg_block_message.
privatemsg_get_link in ./privatemsg.module
Returns a link to send message form for a specific users.
privatemsg_groups_autocomplete in privatemsg_groups/privatemsg_groups.module
Provides autocomplete suggestions for group.
privatemsg_groups_load_multiple in privatemsg_groups/privatemsg_groups.module
Load a number of ogs based on their group ids.
privatemsg_groups_privatemsg_name_lookup in privatemsg_groups/privatemsg_groups.module
Implements hook_privatemsg_name_lookup().

... See full list


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


function privatemsg_recipient_key($recipient) {
  if (empty($recipient->type)) {
    return 'user_' . $recipient->uid;
  return $recipient->type . '_' . $recipient->recipient;