【发布时间】:2014-05-20 14:46:37
【问题描述】:
您好,当我的密码被更改时,有没有办法获得电子邮件? magento 中的正常解决方法是,您获得一个更改密码的链接,然后您可以更改它,但您没有得到确认,您的密码已更改。
你好,
丹尼尔
【问题讨论】:
标签: php email magento hyperlink confirmation
您好,当我的密码被更改时,有没有办法获得电子邮件? magento 中的正常解决方法是,您获得一个更改密码的链接,然后您可以更改它,但您没有得到确认,您的密码已更改。
你好,
丹尼尔
【问题讨论】:
标签: php email magento hyperlink confirmation
使用观察者监听事件customer_save_before。
要检测密码更改并发送邮件,请在观察者中使用以下代码:
$_customer = $observer->getEvent()->getCustomer();
$_post = Mage::app()->getRequest()->getPost();
if($_customer instanceof Mage_Customer_Model_Customer && !$_customer->isObjectNew()) {
if( $_post['change_password'] == 1) {
// Code to send email
}
}
【讨论】: