[-] 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
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11758 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -281,7 +281,15 @@ class AuthControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
// Handle brute force attacks
|
// Handle brute force attacks
|
||||||
sleep(1);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ $(function(){ldelim}
|
|||||||
}
|
}
|
||||||
{/literal}
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
{if isset($authentification_error)}
|
<!--{if isset($authentification_error)}
|
||||||
<div class="error">
|
<div class="error">
|
||||||
{if {$authentification_error|@count} == 1}
|
{if {$authentification_error|@count} == 1}
|
||||||
<p>{l s='There is one error'} :</p>
|
<p>{l s='There is one error'} :</p>
|
||||||
@@ -164,7 +164,7 @@ $(function(){ldelim}
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}-->
|
||||||
<form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std">
|
<form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<h3>{l s='Create your account'}</h3>
|
<h3>{l s='Create your account'}</h3>
|
||||||
@@ -362,7 +362,7 @@ $(function(){ldelim}
|
|||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
{if isset($account_error)}
|
<!--{if isset($account_error)}
|
||||||
<div class="error">
|
<div class="error">
|
||||||
{if {$account_error|@count} == 1}
|
{if {$account_error|@count} == 1}
|
||||||
<p>{l s='There is one error'} :</p>
|
<p>{l s='There is one error'} :</p>
|
||||||
@@ -375,7 +375,7 @@ $(function(){ldelim}
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}-->
|
||||||
<form action="{$link->getPageLink('authentication', true)}" method="post" id="account-creation_form" class="std">
|
<form action="{$link->getPageLink('authentication', true)}" method="post" id="account-creation_form" class="std">
|
||||||
{$HOOK_CREATE_ACCOUNT_TOP}
|
{$HOOK_CREATE_ACCOUNT_TOP}
|
||||||
<fieldset class="account_creation">
|
<fieldset class="account_creation">
|
||||||
|
|||||||
Reference in New Issue
Block a user