Magento – Password reset link not working showing expired

magento-1.9passwordpassword-recovery

When I'm trying to reset password through reset link from my mail, it's showing following error:

Your password reset link has expired.

When I check my password reset link it looks like:

http://example.com/index.php/customer/account/resetpassword/?id=327

the reset password token is not generating I've checked the reset password template and it's looking fine:

<a href="{{store url="customer/account/resetpassword/" _query_id=$customer.id _query_token=$customer.rp_token}}"><span>Reset Password</span></a>

and I didn't update anything in my AccountController.php

public function changeForgottenAction()
{
    try {
        list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession());
        $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken);
        $this->loadLayout();
        $this->renderLayout();
    } catch (Exception $exception) {
        Mage::log($exception);
        $this->_getSession()->addError($this->_getHelper('customer')->__('Your password reset link has expired.'));
        $this->_redirect('*/*/forgotpassword');
    }
}

Best Answer

You'll need to do some digging, as seen the catch (Exception $e){} method catches any exception and outputs that message.

Try logging the exception:

Mage::log($e, null, 'customer_password_reset.log');

Then you can inspect the log file & identify what is causing the issue & figure out how to resolve it.

Related Topic