function overlay_form_user_profile_form_alter

Implements hook_form_FORM_ID_alter().

File

modules/overlay/overlay.module, line 98

Code

function overlay_form_user_profile_form_alter(&$form, &$form_state) {
    if ($form['#user_category'] == 'account') {
        $account = $form['#user'];
        if (user_access('access overlay', $account)) {
            $form['overlay_control'] = array(
                '#type' => 'fieldset',
                '#title' => t('Administrative overlay'),
                '#weight' => 4,
                '#collapsible' => TRUE,
            );
            $form['overlay_control']['overlay'] = array(
                '#type' => 'checkbox',
                '#title' => t('Use the overlay for administrative pages.'),
                '#description' => t('Show administrative pages on top of the page you started from.'),
                '#default_value' => isset($account->data['overlay']) ? $account->data['overlay'] : 1,
            );
        }
    }
}

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