function notifications_autosubscribe_notifications in Notifications 5
Same name and namespace in other branches
- 6 notifications_autosubscribe/notifications_autosubscribe.module \notifications_autosubscribe_notifications()
Implementation of hook_notifications.
File
- notifications_autosubscribe/
notifications_autosubscribe.module, line 66
Code
function notifications_autosubscribe_notifications($op, $arg0, $arg1 = NULL, $arg2 = NULL) {
if ($op == 'event trigger') {
$event = $arg0;
if ($event->type == 'node' && isset($event->node->nid) && (!isset($event->node->autosubscribe) || $event->node->autosubscribe)) {
notifications_autosubscribe('thread', 'node', 'nid', $event->node->nid);
}
}
}