You are here

function og_og in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og_workflow_ng.inc \og_og()
  2. 5 og_workflow_ng.inc \og_og()
  3. 5.3 og_workflow_ng.inc \og_og()
  4. 5.7 og_workflow_ng.inc \og_og()
  5. 6.2 og.module \og_og()

Implementation of hook_og().

File

./og.module, line 438

Code

function og_og($op, $gid, $uid, $args) {
  if (module_exists('rules')) {
    if (in_array($op, array(
      'user insert',
      'user delete',
    ))) {
      $op = str_replace(' ', '_', $op);
      rules_invoke_event('og_' . $op, $uid, $gid);
    }
    elseif ($op == 'user update' && $args['is_active']) {
      rules_invoke_event('og_user_approved', $uid, $gid);
    }
  }
}