Reputation: 139
Hi is there a way to get an E-Mail when my password has been changed? The normal workaround in magento is, that you get a link to change the password, then you can change it, but you do not get a confirmation, that your password has been changed.
Greetings,
Daniel
Upvotes: 1
Views: 1187
Reputation: 8070
Use an observer to listen for the event customer_save_before
.
To detect password change and send mail, use following code within the observer:
$_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
}
}
Upvotes: 1