0
Magento 응용 프로그램에서는 트랜잭션 이메일 템플릿을 사용하여 비밀번호 재설정 메일을 보냈습니다.비밀번호 재설정 실패 magento
다음, 하나의 이메일이 이메일 템플릿을 기반으로, 전송됩니다
우리가 잊어 버린 암호 창에서 submit
버튼을 클릭
Accountcontroller
$newResetPasswordLinkToken = Mage::helper('customer')->generateResetPasswordLinkToken();
/*$customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
$customer->sendPasswordResetConfirmationEmail();*/
$templateId = "Reset_password_user";
$flname = $customer->getFirstname().' '.$customer->getLastname();
$emailTemplate = Mage::getModel('core/email_template')->loadByCode($templateId);
$vars = array('name' => ucwords($flname), 'userid' => $customer->getId(), 'tocken' => $newResetPasswordLinkToken);
$emailTemplate->getProcessedTemplate($vars);
$storeId = Mage::app()->getStore()->getStoreId();
$emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email', $storeId));
$emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name', $storeId));
$emailTemplate->send($email,ucwords($flname), $vars);
의 코드입니다 메일 내용은 다음과 같습니다.
There was recently a request to change the password for your account.
If you requested this password change, please click on the following link to reset your password: http://mywebsite.com/index.php/customer/account/resetpassword/?id=3607&token=f74609505166ef132345ba78539e6b90
If clicking the link does not work, please copy and paste the URL into your browser instead.
If you did not make this request, you can ignore this message and your password will remain the same.
그래서 여기서 무엇이 문제입니까? 내가 메일에 포함 된 링크를 클릭하면
, 그것은라는 오류 메시지와 함께 비밀번호 찾기 링크를로드합니다 :
Your password reset link has expired.