2

i have magento 1.9.1

I have some problem with registration and customer login. In registration page i had some errors with the password field.

--ERROR

Cannot save the customer.
Invalid method Mage_Customer_Model_Customer::cleanPasswordsValidationData(Array ( ) )

So i have modified /httpdocs/app/code/core/Mage/Customer/controllers/AccountController.php

if (empty($errors)) {
  // i have commented this line $customer->cleanPasswordsValidationData();

The registration of customer works but when i try to login it doesn't work. I have the error that LOGIN AND PASSWORD ARE INVALID

I have this error message with new accounts that i created, old accounts works.

How can i solve the problem? It is a problem with magento eav attribute in database?

1
  • do you have the Customer model overwritten in local? Search for app/code/local/Mage/Customer/Model/Customer.php If the file exists then it must have had some functions removed from it
    – Alex Dinca
    Feb 14, 2015 at 12:07

2 Answers 2

3

cleanPasswordsValidationData()is not a default method available in Magento. So I guess you have some customizations which are carried out in AccountController.php or there may be a rewrite for this very same class.

During customer registration, magento will execute createPostAction() method which is present in app/code/core/Mage/Customer/controllers/AccountController.php. If you inspect this method, you can't find a method with name cleanPasswordsValidationData() which is called up on a customer instance.

Even-though you comment it out the line which holds cleanPasswordsValidationData(), that line of code is intended to use some validation on posted data which is important in case of customer registration process. So instead of commenting it out, you need to dig from there and make the validation correct.

May be this customization is done during development of the site. Contact the developer if you are not a developer. That's the only possibility to resolve this issue.

1

Rajeev isn't right. This is default Magento method for the Mage_Customer_Model_Customer class for CE 1.9.1.

There are several possibilities:

1) Your core files were modified.

2) You have old version of that class in code/local/Mage which substitutes Mage_Customer_Model_Customer and doesn't implement this method.

The method itself (CE 1.9.1 version):

/**
 * Clean password's validation data (password, password_confirmation)
 *
 * @return Mage_Customer_Model_Customer
 */
public function cleanPasswordsValidationData()
{
    $this->setData('password', null);
    $this->setData('password_confirmation', null);
    return $this;
}

Your Answer

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

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