You are here

function _subscriptions_content_autosubscribe in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions_content.module \_subscriptions_content_autosubscribe()
  2. 6 subscriptions_content.module \_subscriptions_content_autosubscribe()
  3. 2.0.x subscriptions_content/subscriptions_content.module \_subscriptions_content_autosubscribe()

Auto-subscribes the user, if the content type is not blocked.

Parameters

string $content_type: Content type of the node to subscribe to.

string $module: Parameter for subscriptions_autosubscribe().

string $field: Parameter for subscriptions_autosubscribe().

int|string $value: Parameter for subscriptions_autosubscribe().

string $context: Parameter for subscriptions_autosubscribe().

3 calls to _subscriptions_content_autosubscribe()
subscriptions_content_comment_insert in ./subscriptions_content.module
Implements hook_comment_insert().
subscriptions_content_comment_update in ./subscriptions_content.module
Implements hook_comment_update().
subscriptions_content_node_insert in ./subscriptions_content.module
Implements hook_node_insert().

File

./subscriptions_content.module, line 661
Subscriptions to content events

Code

function _subscriptions_content_autosubscribe($content_type, $module, $field, $value, $context) {
  if (!user_access('subscribe to content') || subscriptions_content_type_is_blocked($content_type)) {
    return;
  }
  subscriptions_autosubscribe($module, $field, $value, $context);
}