You are here

function og_plugin_argument_default_user_groups::get_argument in Organic groups 7.2

Same name and namespace in other branches
  1. 7 includes/views/og_plugin_argument_default_user_groups.inc \og_plugin_argument_default_user_groups::get_argument()

Get the default argument.

Overrides views_plugin_argument_default::get_argument

File

includes/views/handlers/og_plugin_argument_default_user_groups.inc, line 50
Holds the class defining the Views plugin loading the groups the acting user is member of.

Class

og_plugin_argument_default_user_groups
The class defining the Views plugin loading the groups of the acting user.

Code

function get_argument() {

  // Get the group IDs relevant for the acting user, and return them
  // concatenated.
  if ($gids = og_get_groups_by_user(NULL, $this->options['group_type'])) {
    return implode($this->options['glue'], $gids);
  }
  return FALSE;
}