You are here

function _message_subscribe_add_default_notifiers in Message Subscribe 7

Helper function that adds default notifiers to the user IDs array.

Parameters

$uids: Array detailing notification info for users.

See also

message_subscribe_get_subscribers().

1 call to _message_subscribe_add_default_notifiers()
message_subscribe_get_subscribers in ./message_subscribe.module
Get a list of user IDs that need to recieve the message.

File

./message_subscribe.module, line 697
Subscribe API for the Message and Message notify modules.

Code

function _message_subscribe_add_default_notifiers(&$uids) {
  $notifiers = variable_get('message_subscribe_default_notifiers', array(
    'email' => 'email',
  ));
  if (empty($notifiers)) {
    return;
  }

  // Add the notifiers to each user.
  foreach ($uids as $delta => $uid) {
    $uids[$delta]['notifiers'] += $notifiers;
  }
}