【问题标题】:Magento - Change Password confirmation E-MailMagento - 更改密码确认电子邮件
【发布时间】:2014-05-20 14:46:37
【问题描述】:

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

你好,

丹尼尔

【问题讨论】:

    标签: php email magento hyperlink confirmation


    【解决方案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
        }
    }
    

    【讨论】:

    • 这听起来不错。我将检查如何实现观察者。非常感谢您的建议和帮助。
    • 请将我的答案标记为其他有相同问题的人的正确答案。
    猜你喜欢
    • 2012-05-16
    • 1970-01-01
    • 2013-11-21
    • 2016-02-04
    • 1970-01-01
    • 1970-01-01
    • 2011-10-19
    • 2013-07-11
    • 2017-03-18
    相关资源
    最近更新 更多