function notifications_lite_queue_event in Notifications 6
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.2 notifications_lite/notifications_lite.module \notifications_lite_queue_event()
 
Insert lite notification into queue
1 call to notifications_lite_queue_event()
- notifications_lite_notifications in notifications_lite/
notifications_lite.module  - Implementation of hook_notifications()
 
File
- notifications_lite/
notifications_lite.module, line 138  - Simple notifications API
 
Code
function notifications_lite_queue_event($event) {
  $uid = $event->params['for-uid'];
  $account = user_load(array(
    'uid' => $uid,
  ));
  $send_interval = notifications_user_setting('send_interval', $account);
  $send_method = notifications_user_setting('send_method', $account);
  $sql = 'INSERT INTO {notifications_queue} (uid, sid, module, eid, send_interval, send_method, cron, created, conditions) ';
  $sql .= " VALUES(%d, 0, 'notifications', %d, %d, '%s', 1,  %d, 0) ";
  db_query($sql, $uid, $event->eid, $send_interval, $send_method, time());
}