Issue #2866722 by shabana.navas, kpv: Avoid using display mode machine name in AccountForm::form()
parent
6ac09fee5f
commit
a324d5be36
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue