0

Hi when customers click on "forgot Password" they receive the email with a link to reset. When clicked this is the error that they are receiving. Fatal error: Call to a member function setCustomerId() on a non-object in /home/ishieldz/public_html/store/app/code/core/Mage/Customer/controllers/AccountController.php on line 750 Any help would be appreciated. Thank you!

/** * Display reset forgotten password form * * User is redirected on this action when he clicks on the corresponding link in password reset confirmation email * / public function resetPasswordAction() { $resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token'); $customerId = (int) $this->getRequest()->getQuery('id'); try { $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); $this->loadLayout(); // Pass received parameters to the reset forgotten password form $this->getLayout()->getBlock('resetPassword') ->setCustomerId($customerId) ->setResetPasswordLinkToken($resetPasswordLinkToken); $this->renderLayout(); } catch (Exception $exception) { $this->_getSession()->addError( $this->_getHelper('customer')->__('Your password reset link has expired.')); $this->_redirect('/*/forgotpassword'); } }

3 Answers3

1

If you are in Magento 1.9.1 Here is a solution which worked for me.

If your theme doesn’t include any specific custom config or layout settings you can safely delete your customer.xml (or just rename to customer1.xml) file located at /app/design/frontend/default/<your_theme_package>/<your_theme_name>/layout/customer.xml

If you delete this file magento will load the default config options (with the updates) from the factory default magento theme. /app/design/frontend/base/default/layout/customer.xml

Remember to flush / refresh your magento config via administration area, this will force the customer.xml file to be reloaded.

Suman KC
  • 3,478
  • 4
  • 30
  • 42
0

It seems that your invoking an udeclared object, so maybe it's only a variable. Verify if you're declaring your object before the line 750 in your AccountController.php

You must put the declaration of the object (Example: $ob = new Customer();) that contains the setCustomerId() method, into the method that is running.

mgranjao
  • 104
  • 1
  • 1
  • 8
0

login to magento. go to system, design. Delete your current theme and then re-add again.