Skip to content

Preventing the autocomplete/autofill when adding a new user (username/password) #8392

@coliff

Description

@coliff

Currently when adding a new user from the web interface (/settings/users/) browser autocomplete/autofill pre-populates the username and password boxes which is quite annoying. The form, username and password inputs all have autocomplete="off" but this is ignored by most browsers (see Notes at https://caniuse.com/#search=autocomplete)

However, if the password input has autocomplete="new-password" then it prevents the form from autofilling which is a much better user experience for adding new users.

autocomplete=new-password isn't very well known but it works better than autocomplete=off.

I edited settings/templates/users/part.createuser.php to use autocomplete="new-password" on my local installation and it works great. Much easier for adding many new users.

I'd be happy to open a PR for this.

Further info:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete
https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions