Skip to content

Commit cf4910a

Browse files
ENGCOM-5971: #23295: Reset Password Confirmation Link Email Not St… #24783
- Merge Pull Request #24783 from kisroman/magento2:mage-23295 - Merged commits: 1. 35ad339
2 parents f35c6eb + 35ad339 commit cf4910a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public function passwordReminder(CustomerInterface $customer)
340340
*/
341341
public function passwordResetConfirmation(CustomerInterface $customer)
342342
{
343-
$storeId = $this->storeManager->getStore()->getId();
343+
$storeId = $customer->getStoreId();
344344
if (!$storeId) {
345345
$storeId = $this->getWebsiteStoreId($customer);
346346
}

app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public function testPasswordResetConfirmation()
521521

522522
/** @var CustomerInterface|\PHPUnit_Framework_MockObject_MockObject $customer */
523523
$customer = $this->createMock(CustomerInterface::class);
524-
$customer->expects($this->any())
524+
$customer->expects($this->once())
525525
->method('getStoreId')
526526
->willReturn($customerStoreId);
527527
$customer->expects($this->any())
@@ -539,11 +539,6 @@ public function testPasswordResetConfirmation()
539539
->method('getStore')
540540
->willReturn($this->storeMock);
541541

542-
$this->storeManagerMock->expects($this->at(1))
543-
->method('getStore')
544-
->with($customerStoreId)
545-
->willReturn($this->storeMock);
546-
547542
$this->customerRegistryMock->expects($this->once())
548543
->method('retrieveSecureData')
549544
->with($customerId)

0 commit comments

Comments
 (0)