function notifications_lite_queue_event in Notifications 6.2
Same name and namespace in other branches
- 5 notifications_lite/notifications_lite.module \notifications_lite_queue_event()
- 6.4 notifications_lite/notifications_lite.module \notifications_lite_queue_event()
- 6 notifications_lite/notifications_lite.module \notifications_lite_queue_event()
Insert lite notification into queue.
This just insert a row into notifications_queue table for this event, so it will be processed on cron The message information (subject, body) will be in the event itself, as serialized parameters
1 call to notifications_lite_queue_event()
- notifications_lite_add_to_queue in notifications_lite/
notifications_lite.module - Put simple notification into queue
File
- notifications_lite/
notifications_lite.module, line 152 - Simple notifications API
Code
function notifications_lite_queue_event($event) {
$uid = $event->params['for-uid'];
$account = user_load(array(
'uid' => $uid,
));
$queue = array(
'uid' => $uid,
'sid' => 0,
'module' => 'notifications',
'eid' => $event->eid,
'send_interval' => notifications_user_setting('send_interval', $account, 0),
'send_method' => notifications_user_setting('send_method', $account, ''),
'cron' => 1,
'created' => time(),
'conditions' => 0,
);
return drupal_write_record('notifications_queue', $queue);
}