You are here

function search_restrict_form_alter in Search Restrict 7

Same name and namespace in other branches
  1. 5 search_restrict.module \search_restrict_form_alter()
  2. 6.2 search_restrict.module \search_restrict_form_alter()
  3. 6 search_restrict.module \search_restrict_form_alter()

Implements hook_form_alter().

File

./search_restrict.module, line 105
Restrict by role who can search for each content type.

Code

function search_restrict_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'search_form':
      if (array_key_exists('advanced', $form)) {
        $form['#after_build'][] = '_search_restrict_advanced_form';
      }
      break;
  }
}