You are here

function og_vocab_form_search_alter in OG Vocabulary 6

Helper function; Show only accessible vocabularies in advanced search.

See also

og_vocab_taxonomy_form_all().

1 call to og_vocab_form_search_alter()
og_vocab_form_alter in ./og_vocab.module
Implementation of hook_form_alter().

File

./og_vocab.module, line 574
Give each group its own system controlled vocabularies.

Code

function og_vocab_form_search_alter(&$form) {

  // Users with administer organic groups are allowed to access all groups.
  if (!empty($form['advanced']['category']) && !user_access('administer organic groups')) {
    $form['advanced']['category']['#options'] = og_vocab_taxonomy_form_all(TRUE);
  }
}