Issue #1525640 by jeff.maes: Fixed Disable autocompletion for email/password field when editing user profile.

8.0.x
catch 2012-04-25 13:33:09 +09:00
parent 80189e786e
commit 74d3fc229f
1 changed files with 2 additions and 1 deletions

View File

@ -941,7 +941,7 @@ function user_account_form(&$form, &$form_state) {
'#maxlength' => USERNAME_MAX_LENGTH,
'#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
'#required' => TRUE,
'#attributes' => array('class' => array('username')),
'#attributes' => array('class' => array('username'), 'autocomplete' => 'off'),
'#default_value' => (!$register ? $account->name : ''),
'#access' => ($register || ($user->uid == $account->uid && user_access('change own username')) || $admin),
'#weight' => -10,
@ -956,6 +956,7 @@ function user_account_form(&$form, &$form_state) {
'#description' => t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),
'#required' => !(empty($account->mail) && user_access('administer users')),
'#default_value' => (!$register ? $account->mail : ''),
'#attributes' => array('autocomplete' => 'off'),
);
// Display password field only for existing users or when user is allowed to