You are here

function hook_og_audience_options_alter in Organic groups 7

Alter the groups audience fields options.

Parameters

$options: All the groups in the site divided into the "content groups" array and "other groups" array.

$opt_group: TRUE if the user should see also "other groups" options.

$account: The user object for which the field is built.

1 function implements hook_og_audience_options_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

og_register_og_audience_options_alter in og_register/og_register.module
Implements hook_og_audience_alter().
1 invocation of hook_og_audience_options_alter()
og_field_audience_options in ./og.field.inc
Get an array of allowed values for OG audience field.

File

./og.api.php, line 210
Hooks provided by the Organic groups module.

Code

function hook_og_audience_options_alter(&$options, &$opt_group, $account) {

  // Hide every group from the user.
  if ($account->uid == 5) {
    $options['content groups'] = array();
  }
}