You are here

function _node_import_og_groups in Node import 6

Returns a list of available og_groups for current user.

2 calls to _node_import_og_groups()
og_node_import_defaults in supported/og/og.inc
Implementation of hook_node_import_defaults().
og_node_import_fields in supported/og/og.inc
Implementation of hook_node_import_fields().

File

supported/og/og.inc, line 107
Support file for the og (Organic Groups) module.

Code

function _node_import_og_groups() {
  global $user;
  $og_groups = array();
  if (user_access('administer nodes')) {
    $og_groups = og_all_groups_options();
  }
  else {
    foreach (og_get_subscriptions($user->uid) as $key => $value) {
      $og_groups[$key] = $value['title'];
    }
  }
  return $og_groups;
}