You are here

function protected_node_autocomplete_off in Protected Node 7

Same name and namespace in other branches
  1. 6 protected_node.module \protected_node_autocomplete_off()
  2. 1.0.x protected_node.module \protected_node_autocomplete_off()

After_build function to disable autocomplete for the password fields.

Without this FF >= 3 will attempt to autocomplete the fields with the user's login info.

2 string references to 'protected_node_autocomplete_off'
protected_node_node_form_alter in ./protected_node.settings.inc
Actual implementation of the protected_node_form_alter() function.
protected_node_node_type_form_alter in ./protected_node.settings.inc
Implements hook_form_FORM_ID_alter().

File

./protected_node.module, line 1166
Protected Node module.

Code

function protected_node_autocomplete_off($form_element, &$form_state) {
  $form_element['pass1']['#attributes']['autocomplete'] = 'new-password';
  $form_element['pass2']['#attributes']['autocomplete'] = 'new-password';
  return $form_element;
}