You are here

function og_notifications_og in Organic groups 5.7

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

Implementation of hook_og().

File

og_notifications/og_notifications.module, line 122
Subscriptions to content in groups.

Code

function og_notifications_og($op, $gid, $uid, $args) {
  switch ($op) {
    case 'user insert':
      $account = user_load(array(
        'uid' => $uid,
      ));
      og_notifications_user_autosubscribe($account, $gid);
      break;
    case 'user delete':
      $account = user_load(array(
        'uid' => $uid,
      ));
      og_notifications_user_unsubscribe($account, $gid);
      break;
  }
}