You are here

function notifications_autosubscribe_nodeapi in Notifications 6.4

Same name and namespace in other branches
  1. 6.2 notifications_autosubscribe/notifications_autosubscribe.module \notifications_autosubscribe_nodeapi()
  2. 6.3 notifications_autosubscribe/notifications_autosubscribe.module \notifications_autosubscribe_nodeapi()

Implementation of hook_nodeapi()

File

notifications_autosubscribe/notifications_autosubscribe.module, line 13
Notifications Autosubscribe module.

Code

function notifications_autosubscribe_nodeapi(&$node, $op, $arg = 0) {
  global $user;
  if ($user->uid && $op == 'insert' && $node->uid == $user->uid) {
    notifications_autosubscribe($user, 'thread', 'nid', $node->nid);
  }
}