You are here

function og_add_group_action in Organic groups 6

Same name and namespace in other branches
  1. 6.2 modules/og_actions/og_actions.module \og_add_group_action()

A configurable action to add a node to a specific group in organic groups. Requires actions.module.

File

modules/og_actions/og_actions.module, line 131

Code

function og_add_group_action($node, $context) {
  if (isset($context['group'])) {
    $node->og_groups[$context['group']] = $context['group'];
    watchdog('action', 'Added node id %id to %group.', array(
      '%id' => intval($node->nid),
      '%group' => $context['group'],
    ));
  }
}