You are here

function og_rules_event_info in Organic groups 7

Same name and namespace in other branches
  1. 6.2 includes/og.rules.inc \og_rules_event_info()
  2. 6 includes/og.rules.inc \og_rules_event_info()
  3. 7.2 og.rules.inc \og_rules_event_info()

Implementation of hook_rules_event_info().

Adds some additional event that make reacting on user subscriptions easier.

File

./og.rules.inc, line 16
Rules integration for the Organic groups module.

Code

function og_rules_event_info() {
  $defaults = array(
    'variables' => array(
      'og_membership' => array(
        'type' => 'og_membership',
        'label' => t("The user's OG membership"),
      ),
      'account' => array(
        'type' => 'user',
        'label' => t('User'),
      ),
    ),
    'group' => t('OG membership'),
  );
  return array(
    'og_user_insert' => $defaults + array(
      'label' => t('User has become a group member'),
      'help' => t("A user has become a group member, but might have been not yet approved."),
    ),
    'og_user_approved' => $defaults + array(
      'label' => t('User membership has been approved'),
    ),
    'og_user_blocked' => $defaults + array(
      'label' => t('User membership has been blocked'),
    ),
    'og_user_delete' => $defaults + array(
      'label' => t('User has been removed from group'),
      'help' => t("A user has been removed from group and is no longer a group member."),
    ),
  );
}