function contact_form_user_admin_settings_alter

Same name in other branches
  1. 9 core/modules/contact/contact.module \contact_form_user_admin_settings_alter()
  2. 8.9.x core/modules/contact/contact.module \contact_form_user_admin_settings_alter()
  3. 10 core/modules/contact/contact.module \contact_form_user_admin_settings_alter()
  4. 11.x core/modules/contact/contact.module \contact_form_user_admin_settings_alter()

Implements hook_form_FORM_ID_alter().

Add the default personal contact setting on the user settings page.

See also

user_admin_settings()

File

modules/contact/contact.module, line 254

Code

function contact_form_user_admin_settings_alter(&$form, &$form_state) {
    $form['contact'] = array(
        '#type' => 'fieldset',
        '#title' => t('Contact settings'),
        '#weight' => 0,
    );
    $form['contact']['contact_default_status'] = array(
        '#type' => 'checkbox',
        '#title' => t('Enable the personal contact form by default for new users.'),
        '#description' => t('Changing this setting will not affect existing users.'),
        '#default_value' => variable_get('contact_default_status', 1),
    );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.