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

This commit is contained in:
mBertholino
2012-01-03 16:06:58 +00:00
parent a9cf819918
commit 41acb64027
+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())