-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug reportgood first issue
Description
Steps to reproduce
- Login to Magento Backend
- Create Multi Store with Two Different Stores
- Go to Magento Store Frontend in both the Stores
- Register Customer on both the Stores from Frontend
- Login to Magento Backend if not loggedin already
- go to Customers -> All Customers
- Find the Customer Id which you have Registered on the Store 2
- Click on Edit Customer
- Click on the Reset Password Link on the Top
Expected result
- The Customer Registered on the Second Store Should Receive the Mail from the Second Store with the Reset Password Link for the Second Store
Actual result
-
The Customer Regsitered on the Second Store gets the Email from the Default Store or the First Store
Solution:
Inside the Customer AccountManagement.php Model(vendor/magento/module-customer/Model)
Inside sendPasswordReminderEmail function change
Replace:
public function sendPasswordReminderEmail($customer)
{
$storeId = $this->storeManager->getStore()->getId();
if (!$storeId) {
$storeId = $this->getWebsiteStoreId($customer);
}
$customerEmailData = $this->getFullCustomerObject($customer);
$this->sendEmailTemplate(
$customer,
self::XML_PATH_REMIND_EMAIL_TEMPLATE,
self::XML_PATH_FORGOT_EMAIL_IDENTITY,
['customer' => $customerEmailData, 'store' => $this->storeManager->getStore($storeId)],
$storeId
);
return $this;
}
with:
public function sendPasswordReminderEmail($customer)
{
// Need to Get Store Id from the Customer Account
$storeId = $customer->getStoreId();
if (!$storeId) {
$storeId = $this->getWebsiteStoreId($customer);
}
$customerEmailData = $this->getFullCustomerObject($customer);
$this->sendEmailTemplate(
$customer,
self::XML_PATH_REMIND_EMAIL_TEMPLATE,
self::XML_PATH_FORGOT_EMAIL_IDENTITY,
['customer' => $customerEmailData, 'store' => $this->storeManager->getStore($storeId)],
$storeId
);
return $this;
}
dakzilla, sshymko, korostii, ArturoI and dmanners
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug reportgood first issue