// improve multishop code with id_shop = 0 when share_customer or share_order is true
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11169 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -187,7 +187,10 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
public function add($autodate = true, $null_values = true)
|
||||
{
|
||||
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->getID();
|
||||
if (Context::getContext()->shop->getGroup()->share_customer == true)
|
||||
$this->id_shop = null;
|
||||
else
|
||||
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->getID();
|
||||
$this->id_group_shop = ($this->id_group_shop) ? $this->id_group_shop : Context::getContext()->shop->getGroupID();
|
||||
$this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days);
|
||||
$this->secure_key = md5(uniqid(rand(), true));
|
||||
|
||||
Reference in New Issue
Block a user