cancel
Showing results for 
Search instead for 
Did you mean: 

Magento - change email in forgotpassword before check it

SOLVED

Magento - change email in forgotpassword before check it

Hello

 

In forgot password form, i need to get the email and change it before magento check it.

 

Why?, beacuse i need to change a customer personal number like 9834592845 to their email store in database (bla@ble.bli)

i work with the event: controller_action_predispatch_customer_account_forgotpassword

 

but i can't get the email, i tried

$username = $observer->getRequest()->getPost('email');
$username = $observer->getRequest()->getPost();
$postData = Mage::app()->getRequest()->getPost();
$username = $observer->getData('email');
$username = $observer->getEmail();
$username = $_POST;
$username = $_POST['login']['username'];
$username = $_POST['login']['email'];
Mage::log($username);

and more, but nothing.

 

What i'm doing wrong.

 

 

I appreciate any help.

1 REPLY

Re: Magento - change email in forgotpassword before check it

Ok, i found the answer

 

use the observer in:

<controller_action_predispatch_customer_account_forgotpasswordpost>

and in the method you can get:

$_POST['email']