You are here

function glossary_user in Glossary 5.2

Same name and namespace in other branches
  1. 5 glossary.module \glossary_user()
  2. 6 glossary.module \glossary_user()

Implementation of hook_user().

File

./glossary.module, line 416
Glossary terms will be automatically marked with links to their descriptions.

Code

function glossary_user($type, $edit, $user) {
  switch ($type) {
    case 'form':

      // Note: this requires a setting. Do we also need to clear cache if selected?
      if (variable_get('glossary_disable_indicator', FALSE)) {
        $form['content_glossary'] = array(
          '#type' => 'fieldset',
          '#title' => t('Glossary Indicators'),
        );
        $form['content_glossary']['glossary_disable_indicator'] = array(
          '#type' => 'checkbox',
          '#title' => t('Disable Glossary indicators'),
          '#return_value' => 1,
          '#default_value' => $user->glossary_disable_indicator,
          '#description' => t('Check this box to disable the display of Glossary indicators.'),
        );
        return $form;
      }
      break;
  }
}