// Updated isTokenValid(). Thanks Olea.

This commit is contained in:
bMancone
2012-03-27 13:05:51 +00:00
parent feb7682e67
commit ba24216b82
3 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ class AddressControllerCore extends FrontController
$address->id_customer = (int)$this->context->customer->id;
// Check page token
if ($this->isTokenValid())
if ($this->context->customer->isLogged() && !$this->isTokenValid())
$this->errors[] = Tools::displayError('Invalid token');
// Check phone
@@ -175,7 +175,7 @@ class AddressControllerCore extends FrontController
$this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
else if (!$country->isNeedDni())
$address->dni = null;
// Check if the alias exists
if (!empty($_POST['alias'])
&& (int)$this->context->customer->id > 0