When using a mobile browser (Android 2.2 stock):

  • Log in with your usename
  • When the browser asks, save the password
  • Go to user/edit

Now the browser autocompletes the form with your current password and username (which is usually wrong).

A simple solution is $form['#attributes'] = array('autocomplete' => 'off');.
This won't hurt any other functionality, but on this form it can save you headaches.

I suggest using this on other forms where it might cause problems also.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Coornail’s picture

Here's a patch:

Coornail’s picture

Status: Active » Needs review
coltrane’s picture

Status: Needs review » Closed (duplicate)

Marking as duplicate of #787876: Edit "My Account" fills the first password field because it has more discussion and is progressing first under Drupal 8, then can be backported.