You are here

function messaging_store_pull_pending in Messaging 5

Get pending messages for method

See also

messaging_pull_pending()

File

./messaging.store.inc, line 91
Database storage for the messaging framework

Code

function messaging_store_pull_pending($method, $users, $limit = 0, $delete = TRUE) {
  $messages = messaging_store_get(array(
    'method' => $method,
    'uid' => $users,
  ));

  // Not exactly delete but mark as sent
  if ($messages && $delete) {
    messaging_store_sent(array_keys($messages));
  }
  return $messages;
}