diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 0965e20..d06e42d 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -350,7 +350,9 @@ public function validate(array $form, FormStateInterface $form_state) { // Check whether the user name provided is an email address, if so, make // sure it matches the mail value. - if (\Drupal::config('user.settings')->get('verify_email_match') && (filter_var($name, FILTER_VALIDATE_EMAIL) && ($name !== $mail))) { + // @todo Replace email validation with Symfony validator when + // https://www.drupal.org/node/2313669 is in. + if ($this->config('user.settings')->get('verify_email_match') && (filter_var($name, FILTER_VALIDATE_EMAIL) && ($name !== $mail))) { $form_state->setErrorByName('name', $this->t('You have provided an email address as a username, but this does not match your email address.')); } }