/** * 2016-06-04 * @return \DateTime|null */ public function dob() { return dfc($this, function () { /** @var \DateTime|null $result */ $result = $this->_dob(); if (!$result && df_is_customer_attribute_required('dob')) { $result = new \DateTime(); $result->setDate(1900, 1, 1); } return $result; }); }
/** * 2016-06-04 * @used-by mc() * @used-by register() * @return array(string => mixed) */ protected function customerData() { return dfc($this, function () { return df_clean(['firstname' => $this->c()->nameFirst(), 'lastname' => $this->c()->nameLast(), 'middlename' => $this->c()->nameMiddle(), 'dob' => $this->c()->dob(), 'email' => $this->c()->email() ?: df_next_increment('customer_entity') . '@none.com', 'force_confirmed' => true, 'gender' => $this->c()->gender(), 'password' => $this->c()->password(), 'taxvat' => df_is_customer_attribute_required('taxvat') ? '000000000000' : '', $this->fId() => $this->c()->id()]); }); }