Skip to content

Commit 4cb4647

Browse files
committed
MAGETWO-59489: [Github] Can't change reset password template #6885
1 parent 2ff5e24 commit 4cb4647

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class EmailNotification implements EmailNotificationInterface
6060
self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
6161
];
6262

63+
/**
64+
* Map of templates. Use for backward compatibility
65+
*/
6366
const TEMPLATE_MAP = [
6467
self::XML_PATH_FORGOT_EMAIL_TEMPLATE => self::XML_PATH_RESET_PASSWORD_TEMPLATE
6568
];
@@ -245,7 +248,7 @@ private function sendEmailTemplate(
245248
$storeId = null,
246249
$email = null
247250
) {
248-
$templateId = $this->getCorrectTemplateId($template, 'store', $storeId);
251+
$templateId = $this->getTemplateId($template, 'store', $storeId);
249252
if ($email === null) {
250253
$email = $customer->getEmail();
251254
}
@@ -390,7 +393,7 @@ public function newAccount(
390393
* @param string $storeId
391394
* @return string
392395
*/
393-
private function getCorrectTemplateId($template, $scopeType, $storeId)
396+
private function getTemplateId($template, $scopeType, $storeId)
394397
{
395398
if (array_key_exists($template, self::TEMPLATE_MAP)) {
396399
$templateId = $this->scopeConfig->getValue(self::TEMPLATE_MAP[$template], $scopeType, $storeId);

0 commit comments

Comments
 (0)