You are here

function og_remove_groups_action in Organic groups 6

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

Action to remove a node from all groups. Requires actions.module.

File

modules/og_actions/og_actions.module, line 120

Code

function og_remove_groups_action($node, $context) {
  if (!empty($node->og_groups)) {
    $node->og_groups = array();
    watchdog('action', 'Removed node %id from all groups.', array(
      '%id' => intval($node->nid),
    ));
  }
}