Magento - 更改密码确认电子邮件

时间:2014-05-20 14:46:37

标签: php email magento hyperlink confirmation

我的密码更改后有没有办法收到电子邮件? magento的正常解决方法是,您获得了更改密码的链接,然后您可以更改密码,但是您没有得到确认,您的密码已被更改。

问候,

丹尼尔

1 个答案:

答案 0 :(得分:1)

使用观察者来监听事件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
    }
}
相关问题