You are here

function privatemsg_message_load in Privatemsg 6

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

Load a single message.

Parameters

$pmid: Message id, pm.mid field

$account: For which account the message should be loaded. Defaults to the current user.

Related topics

3 calls to privatemsg_message_load()
PrivatemsgTestCase::testPrivatemsgFlush in ./privatemsg.test
Tests for the flush feature
privatemsg_cron in ./privatemsg.module
Implements hook_cron().
privatemsg_reply in ./privatemsg.module
Send a reply message

File

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

Code

function privatemsg_message_load($pmid, $account = NULL) {
  $messages = privatemsg_message_load_multiple(array(
    $pmid,
  ), $account);
  return current($messages);
}