You are here

function og_notifications_user_autosubscribe in Organic groups 6

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

Handle autosubscriptions for users when they join a group.

Parameters

Object $account: The user account object.

Integer $gid: The node ID of the group being subscribed to.

1 call to og_notifications_user_autosubscribe()
og_notifications_og in modules/og_notifications/og_notifications.module
Implementation of hook_og().

File

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

Code

function og_notifications_user_autosubscribe($account, $gid) {
  if (og_notifications_user_autosubscribe_get($account->uid)) {
    og_notifications_user_subscribe($account, $gid);
  }
}