Unverified Commit a324d5be authored by alexpott's avatar alexpott

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

parent 6ac09fee
......@@ -172,7 +172,7 @@ public function form(array $form, FormStateInterface $form_state) {
// 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';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment