diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index db1ba053b..141141388 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -281,7 +281,15 @@ class AuthControllerCore extends FrontController { // Handle brute force attacks sleep(1); - $this->errors[] = Tools::displayError('Authentication failed'); + + if (!Customer::customerExists($email)) + { + $this->create_account = true; + $this->context->smarty->assign('email_create', Tools::safeOutput($email)); + $_POST['email'] = $email; + } + else + $this->errors[] = Tools::displayError('Authentication failed'); } else { diff --git a/themes/default/authentication.tpl b/themes/default/authentication.tpl index 019ee6617..d62a72ce2 100644 --- a/themes/default/authentication.tpl +++ b/themes/default/authentication.tpl @@ -151,7 +151,7 @@ $(function(){ldelim} } {/literal} - {if isset($authentification_error)} +
{/if} {else} - {if isset($account_error)} +