Magento Password Reset Not Working

Magento Logo

Posted on March 17, 2014 in Development

Your customer forgets a password to her account in your Magento shop. “No problem,” she thinks, “I’ll just reset it and all will be fine.” Full of innocent optimism, she clicks on the “Forgot your password?” link on your site, enters her email address and hits “Submit”. But instead of receiving her new password, she is met with this type of error message:

Invalid method Mage_Customer_Model_Customer::changeResetPasswordLinkToken(Array ([0] => 783bcddd8666cb48a192207bafd7f84e ))

Not very good, is it? In the worst case, the customer will lose her patience and trust in your shop and buy whatever it is she is looking for somewhere else. In a better case, she will create a new account with a new email address and buy the product from you. In the best case, she will actually take the time to write you an email to let you know about this problem. (Presumably, you didn’t know about it until know, because if you did, you would have already fixed it, right? Right?!?)

If this happens to you, here are a few tips:

1) The password retrieval function was changed in the recent versions of Magento. Originally, Magento used to send the new password to the customer directly in an email, but since this could lead to security issues starting with Magento 1.6 or 1.7 the customer now receives a temporary link to a password reset page on your site. As such, the underlying Magento code has changed.

If you have recently upgraded to Magento 1.6 or higher and are using a custom theme, check whether you have customer.xml file in your theme layout folder. If you do, try to temporarily rename it to something else (e.g. customer.xml.bk), clear Magento cache, and see if the problem with the new password retrieval still persists. If it fixes the problem, it means that your theme’s customer.xml file is outdated. Open it in your favorite editor and make sure it includes this section:

<customer_account_resetpassword translate="label">
    <label>Reset a Password</label>
    <remove name="right">
    <remove name="left">

    <reference name="head">
        <action method="setTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
        <action method="setHeaderTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="content">
        <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml">
    </block></reference>
</remove></remove>
</customer_account_resetpassword>

Save it and upload it back to your FTP. Ideally, you’d compare it with the base theme’s customer.xml file in case there are some other differences.

2) If the above is not the problem, check if you have some 3rd party extensions installed which override the customer model. It’s possible these are outdated and need updating. Try disabling them one by one either in ‘System > Configuration > Advanced > Advanced’ or even better by setting the active flag to false in their configuration file under /app/etc/modules.

3) Lastly, make sure that the customer model is not overridden in your local Magento code. Check /app/code/local/Mage/. See if there’s a Customer folder there and if there’s anything inside (possibly Customer/Model/customer.php). If there is, it overrides the core Magento files and you will likely need to update this local override or disable it (in case you don’t need it anymore).

This last tip was the cause of the password retrieval problem in one of the shops that I manage. I inherited it after other developers and it took me quite some time to realize that they overrode the customer model in the local folder. Hooray for working with legacy code.

Enjoyed this post? Share it with others.
Share on email
Email
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter

Responses (8)

  1. Christoffer
    June 17, 2014 at 7:13 pm · Reply

    Thanks! This helped me a lot!!

    • pixel.ninja
      June 17, 2014 at 7:21 pm ·

      Great, glad to hear that!

  2. Y. Stims
    October 17, 2014 at 8:44 pm · Reply

    This fixed my problem to, thanks!

    • pixel.ninja
      October 17, 2014 at 10:36 pm ·

      Awesome. I’m happy it helped you!

  3. Magento Expert
    November 4, 2014 at 7:50 pm · Reply

    nice article, this article and other article from magentostack.com helped me to fix my problem. other article is http://www.magentostack.com/magento-reset-password-email-and-functionality-is-not-working-with-custom-theme/

    • pixel.ninja
      November 4, 2014 at 9:12 pm ·

      Cool bananas. Thanks for sharing the link to the MagentoStack article.

  4. Derak
    November 6, 2015 at 3:01 am · Reply

    Thanks for the post. I was looking for info on a login issue after applying SUPEE-6788 and you pointed me in the right direction. Thanks.

    • pixel.ninja
      November 6, 2015 at 3:50 am ·

      My pleasure, Derak. I’m glad you found it helpful.

Leave a reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.