You are here

function _seckit_form_alter_login_form in Security Kit 7

Same name and namespace in other branches
  1. 8 seckit.module \_seckit_form_alter_login_form()
  2. 2.x seckit.module \_seckit_form_alter_login_form()

Form alteration helper for user login forms.

3 calls to _seckit_form_alter_login_form()
seckit_form_user_login_alter in ./seckit.module
Implements hook_form_FORM_ID_alter() for 'user_login'.
seckit_form_user_login_block_alter in ./seckit.module
Implements hook_form_FORM_ID_alter() for 'user_login_block'.
seckit_form_user_register_form_alter in ./seckit.module
Implements hook_form_FORM_ID_alter() for 'user_register'.

File

./seckit.module, line 220
Allows administrators to improve security of the website.

Code

function _seckit_form_alter_login_form(&$form, &$form_state) {
  $options = _seckit_get_options();
  if ($options['seckit_various']['disable_autocomplete']) {
    $form['#attributes']['autocomplete'] = 'off';
    if (isset($form['pass'])) {
      $form['pass']['#attributes']['autocomplete'] = 'off';
    }
  }
}