[-] FO : if th user doesn't have any account and he's still trying to log in, he will be redirected to the create account form

This commit is contained in:
mBertholino
2011-12-26 11:07:19 +00:00
parent 2c83d9bf2f
commit 8813128b44
2 changed files with 13 additions and 5 deletions
+9 -1
View File
@@ -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
{
+4 -4
View File
@@ -151,7 +151,7 @@ $(function(){ldelim}
}
{/literal}
</script>
{if isset($authentification_error)}
<!--{if isset($authentification_error)}
<div class="error">
{if {$authentification_error|@count} == 1}
<p>{l s='There is one error'} :</p>
@@ -164,7 +164,7 @@ $(function(){ldelim}
{/foreach}
</ol>
</div>
{/if}
{/if}-->
<form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std">
<fieldset>
<h3>{l s='Create your account'}</h3>
@@ -362,7 +362,7 @@ $(function(){ldelim}
</form>
{/if}
{else}
{if isset($account_error)}
<!--{if isset($account_error)}
<div class="error">
{if {$account_error|@count} == 1}
<p>{l s='There is one error'} :</p>
@@ -375,7 +375,7 @@ $(function(){ldelim}
{/foreach}
</ol>
</div>
{/if}
{/if}-->
<form action="{$link->getPageLink('authentication', true)}" method="post" id="account-creation_form" class="std">
{$HOOK_CREATE_ACCOUNT_TOP}
<fieldset class="account_creation">