You are here

function messaging_pull_pending in Messaging 5

Same name and namespace in other branches
  1. 6 messaging.module \messaging_pull_pending()
  2. 6.2 messaging.module \messaging_pull_pending()
  3. 6.3 messaging.module \messaging_pull_pending()

Pull pending messages for given methods and user accounts

Each returned message will be an array with the following elements

  • 'uid', destination uid
  • 'sender', originating uid
  • 'subject', message subject to be rendered
  • 'body', message body to be rendered

Parameters

$method: Send method

$users: User id or array of user id's

$limit: Optional limit for number of messages

$delete: Optional whether to delete messages when fetching

Return value

array() Array of pending messages.

1 call to messaging_pull_pending()
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Play with creating, retrieving, deleting a pair messages

File

./messaging.module, line 570

Code

function messaging_pull_pending($method, $users, $limit = 0, $delete = TRUE) {
  return messaging_store('pull_pending', $method, $users, $limit, $delete);
}