Issue #2866722 by shabana.navas, kpv: Avoid using display mode machine name in AccountForm::form()

8.7.x
Alex Pott 2018-10-12 23:01:59 +01:00
parent 6ac09fee5f
commit a324d5be36
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ abstract class AccountForm extends ContentEntityForm {
// When not building the user registration form, prevent web browsers from
// autofilling/prefilling the email, username, and password fields.
if ($this->getOperation() != 'register') {
if (!$register) {
foreach (['mail', 'name', 'pass'] as $key) {
if (isset($form['account'][$key])) {
$form['account'][$key]['#attributes']['autocomplete'] = 'off';