Jump to content

flowersticky

Members
  • Posts

    2
  • Joined

  • Last visited

flowersticky's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. public function add($autodate = true, $null_values = true) { $this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id; $this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group; $this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id; $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); $this->secure_key = md5(uniqid(rand(), true)); $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes')); /* ADD THIS BELLOW 2 LINES CODE TO DISABLE AUTO ACTIVATION AFTER REGISTRATION*/ $this->active = false; return parent::add($autodate, $null_values); if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) { $this->newsletter_date_add = date('Y-m-d H:i:s'); } if ($this->id_default_group == Configuration::get('PS_CUSTOMER_GROUP')) { if ($this->is_guest) { $this->id_default_group = (int)Configuration::get('PS_GUEST_GROUP'); } else { $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); } } /* Can't create a guest customer, if this feature is disabled */ if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) { return false; } $success = parent::add($autodate, $null_values); $this->updateGroup($this->groupBox); return $success; }
×
×
  • Create New...