Skip to content

Commit 491a101

Browse files
author
okarpenko
committed
MAGETWO-54615: Behavioral bug in CustomerRepositoryInterface::save() implementation #5050
1 parent 49978f9 commit 491a101

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ private function populateCustomerWithSecureData($customerModel, $passwordHash =
235235
$customerModel->setFailuresNum($customerSecure->getFailuresNum());
236236
$customerModel->setFirstFailure($customerSecure->getFirstFailure());
237237
$customerModel->setLockExpires($customerSecure->getLockExpires());
238-
} elseif ($passwordHash !== null) {
238+
} elseif ($passwordHash) {
239239
$customerModel->setPasswordHash($passwordHash);
240240
}
241241

242-
if ($customerModel->getId() && $passwordHash !== null) {
242+
if ($passwordHash && $customerModel->getId()) {
243243
$this->customerRegistry->remove($customerModel->getId());
244244
}
245245
}

0 commit comments

Comments
 (0)