Skip to content

Commit edaf7e8

Browse files
author
Sergii Kovalenko
committed
Merge branch 'MAGETWO-54179' into BUGS
2 parents 9d5ac3a + 36b3aaf commit edaf7e8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/code/Magento/Customer/Model/EmailNotification.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ private function getWebsiteStoreId($customer, $defaultStoreId = null)
268268
{
269269
if ($customer->getWebsiteId() != 0 && empty($defaultStoreId)) {
270270
$storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds();
271-
reset($storeIds);
272-
$defaultStoreId = current($storeIds);
271+
$defaultStoreId = reset($storeIds);
273272
}
274273
return $defaultStoreId;
275274
}
@@ -282,9 +281,9 @@ private function getWebsiteStoreId($customer, $defaultStoreId = null)
282281
*/
283282
public function passwordReminder(CustomerInterface $customer)
284283
{
285-
$storeId = $this->storeManager->getStore()->getId();
284+
$storeId = $this->getWebsiteStoreId($customer);
286285
if (!$storeId) {
287-
$storeId = $this->getWebsiteStoreId($customer);
286+
$storeId = $this->storeManager->getStore()->getId();
288287
}
289288

290289
$customerEmailData = $this->getFullCustomerObject($customer);

0 commit comments

Comments
 (0)