Query for email address already existing I want to customise registration form action in my drupal8 site.I want to check email address is already existing.I have tried with different queries.But not worked.Can anyone to help me to solve this issue?
Use this code to check if there is a user with provided email.

$account = user_load_by_mail($email);

if ($account) {
  // Do something.
  $form_state-&gt;setError(....
}


Besides, as I know in standard registration form there is already such validation.