1

I am using magento1.7.0.2 , want to perform some operation while user submit request for forgot password from frontend using event observer.

i tried customer_save_after is a event for adminhtml not for frontend.

any help would be appreciate!

2 Answers 2

0

Try to play around with events:

To run your observer after reset password action

controller_action_postdispatch_customer_account_forgotpassword

and in your observer add checking if email is sent

$email = (string) $this->getRequest()->getPost('email');
if ($email) {
    //here place your code to notify customer
}
4
  • I have tried using above events. my code is here..its not calling the observer method.<controller_action_postdispatch_customer_account_resetpassword> <observers> <send_forgetpassword_sms> <class>Test_Tested_Model_Observer</class> <method>ForgetPasswordAlerts</method> </send_forgetpassword_sms> </observers> </controller_action_postdispatch_customer_account_resetpassword>
    – user5438
    Commented Feb 26, 2014 at 11:17
  • Instead of resetpassword try to use forgotpassword. See answer I updated it. Commented Feb 26, 2014 at 11:55
  • Thanks.i tried but it is calling method when i click on forgot password link. i want after entering email id need customer data to alert them with new password. I have placed in frontend area.
    – user5438
    Commented Feb 26, 2014 at 12:27
  • Answer updated. Commented Feb 27, 2014 at 17:15
2

Use eventcontroller_action_postdispatch_customer_account_forgotpasswordpost instead of controller_action_postdispatch_customer_account_forgotpassword

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.