You are here

function _privatemsg_load_thread_participants in Privatemsg 6

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

Load all participants of a thread, optionally without author.

Parameters

$thread_id: Thread ID for wich the participants should be loaded.

2 calls to _privatemsg_load_thread_participants()
pm_send_validate in ./privatemsg.module
privatemsg_reply in ./privatemsg.module
Send a reply message

File

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

Code

function _privatemsg_load_thread_participants($thread_id) {
  $query = _privatemsg_assemble_query('participants', $thread_id);
  $result = db_query($query['query']);
  $participants = array();
  while ($uid = db_fetch_object($result)) {
    if ($recipient = user_load($uid->uid)) {
      $participants[$recipient->uid] = $recipient;
    }
  }
  return $participants;
}