From a324d5be362098b2acdaffae995d02b9c0a25c47 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 12 Oct 2018 23:01:59 +0100 Subject: [PATCH] Issue #2866722 by shabana.navas, kpv: Avoid using display mode machine name in AccountForm::form() --- core/modules/user/src/AccountForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index ad18cf72a38..3ed2c953395 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -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';