Skip to content

Commit 1f0b3e0

Browse files
committed
Merge remote-tracking branch 'origin/AC-9313' into spartans_pr_07112023
2 parents bc1c7ba + 533a05b commit 1f0b3e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ public function save(CustomerInterface $customer, $passwordHash = null)
204204
if ($customer->getId()) {
205205
$prevCustomerData = $this->getById($customer->getId());
206206
$prevCustomerDataArr = $this->prepareCustomerData($prevCustomerData->__toArray());
207+
$customer->setCreatedAt($prevCustomerData->getCreatedAt());
207208
}
208209
/** @var $customer \Magento\Customer\Model\Data\Customer */
209210
$customerArr = $customer->__toArray();
@@ -219,7 +220,6 @@ public function save(CustomerInterface $customer, $passwordHash = null)
219220
/** @var CustomerModel $customerModel */
220221
$customerModel = $this->customerFactory->create(['data' => $customerData]);
221222
$this->populateWithOrigData($customerModel, $prevCustomerDataArr);
222-
223223
//Model's actual ID field maybe different than "id" so "id" field from $customerData may be ignored.
224224
$customerModel->setId($customer->getId());
225225
$storeId = $customerModel->getStoreId();

0 commit comments

Comments
 (0)