You are here

function og_notifications_nodeapi in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og_notifications/og_notifications.module \og_notifications_nodeapi()
  2. 5 og_notifications/og_notifications.module \og_notifications_nodeapi()
  3. 5.3 og_notifications/og_notifications.module \og_notifications_nodeapi()
  4. 5.7 og_notifications/og_notifications.module \og_notifications_nodeapi()
  5. 6.2 modules/og_notifications/og_notifications.module \og_notifications_nodeapi()

Implementation of hook_nodeapi().

File

modules/og_notifications/og_notifications.module, line 138
Provide notifications and messaging support for organic groups.

Code

function og_notifications_nodeapi(&$node, $op, $arg = 0) {
  switch ($op) {
    case 'delete':

      // Remove all group subscriptions for this node.
      notifications_delete_subscriptions(array(
        'type' => 'group',
      ), array(
        'group' => $node->nid,
      ));
      notifications_delete_subscriptions(array(
        'type' => 'grouptype',
      ), array(
        'group' => $node->nid,
      ));
      break;
  }
}