[-] FO : fixed bug while updating customer personal information, the customer couldn't deselect the newsletter checkbox or the optin checkbox

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12083 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mBertholino
2012-01-03 16:06:58 +00:00
parent e5cad60084
commit 7bd3fddc70
+4 -1
View File
@@ -44,7 +44,6 @@ class IdentityControllerCore extends FrontController
*/
public function postProcess()
{
if (isset($_POST['years']) && isset($_POST['months']) && isset($_POST['days']))
$this->customer->birthday = (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']);
@@ -71,6 +70,10 @@ class IdentityControllerCore extends FrontController
{
$this->customer->id_default_group = (int)($prev_id_default_group);
$this->customer->firstname = Tools::ucfirst(Tools::strtolower($this->customer->firstname));
if (!isset($_POST['newsletter']))
$this->customer->newsletter = 0;
if (!isset($_POST['optin']))
$this->customer->optin = 0;
if (Tools::getValue('passwd'))
$this->context->cookie->passwd = $this->customer->passwd;
if ($this->customer->update())