You are here

function og_og in Organic groups 5

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

Implementation of hook_og().

File

./og_workflow_ng.inc, line 64
workflow_ng integration for og module.

Code

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