23

I am encountering this issue in CE1.9.1.

When a User registers (doesn't matter if it's during checkout or from the Create an Account link) the user keeps getting the password mismatch error even though the password is re-entered correctly.

The form validation does not indicate a miss-match, but once a user clicks on Register it returns the mismatch error.

There is no errors in the chrome console...

I found this: "Please make sure your passwords match" - Password error in Checkout with New Registration form

But I don't believe it is the same error.

I need to fix it soon, any help is greatly appreciated!

  • This fixes the error in checkout cart but to get the "My Account" section to work I had to disable the compiler in ( admin|system|tools|compilation). ( re-compiling would probably work as well) – wiredoug Jan 5 '15 at 7:20
24

Children of class Mage_Customer_Model_Customer should use getPasswordConfirmation() instead of getConfirmation()

Upd: In class Mage_Customer_Model_Customer, method validate() was changed

Before v1.9.1:

$confirmation = $this->getConfirmation();

After:

$confirmation = $this->getPasswordConfirmation();


  • Note also that you should check any controller overrides as well, not just models that extend this class! – benz001 May 25 '15 at 5:51
  • 2
    The mind boggles how something so critical as to stop an ecommerce store allowing purchases can make it through QA and into an official release. – mikemike Jul 10 '15 at 10:11
  • 1
    Also in some extensions need to change setConfirmation() to setPasswordConfirmation(). That was FireCheckout in my case. Class: TM_FireCheckout_Model_Type_Standard, method: _validateCustomerData(). – gSorry Dec 4 '15 at 15:15
5

Finally, I was able to solve the issue.

I have to mention it is really not good that magento core files have this kind of issues when they secure the passwords, guess the core developers forgot some simple things.

Ok, so to fix this issue you have to override the core customer model in local like app/code/local/Mage/Customer/Model/Customer.php. In that go to around line no. 843 (if you haven't already overriden) or go to line if (strlen($password) && !Zend_Validate::is($password, 'StringLength', array(6))) { $errors[] = Mage::helper('customer')->__('The minimum password length is %s', 6); } and add the following code below that block:

//To match passwords in both Create account and Checkout register pages start
    if ( Mage::app()->getRequest()->getServer('HTTP_REFERER') == Mage::getUrl('customer/account/create') )
      $confirmation = $this->getPasswordConfirmation();
    else
      $confirmation = $this->getConfirmation();
    //To match passwords in both Create account and Checkout register pages end

After this the password and confirm password will match on both "Checkout" and "Create Account" pages.

Hope this could help someone.

3

If anybody still can't figure out, why this is happening: The Conlabz Useroptin extension (http://www.magentocommerce.com/magento-connect/newsletter-double-opt-in-for-customers.html) can cause this behavior aswell.

Update 1.1.0 of said extension adds 1.9 compatibility

3

I have an extension that was overriding the AccountController.php and was having the same issue for Magento Platforms below 1.9.1

My solution was;

if (version_compare(Mage::getVersion(), '1.9.1', '<=')) {        
$customer->setPasswordConfirmation($request->getPost('confirmation'));
}

if (version_compare(Mage::getVersion(), '1.9.0', '>=')) {
$customer->setConfirmation($request->getPost('confirmation'));
}
2

For me neither $this->getPasswordConfirmation() nor $this->getConfirmation() worked. Both returned an empty string. So I ended up in accessing the POST parameter directly, in /app/code/core/Mage/Customer/Model/Customer.php (yes, better use a copy in /app/code/local):

if (isset($_REQUEST['confirmation']))
    $confirmation = $_REQUEST['confirmation'];
else
    $confirmation = $this->getPasswordConfirmation();
  • 1
    ha ha good crack :) – Keyur Shah Nov 14 '16 at 19:37
0

it's because of this change in 1.9.1 update. You have to update your extensions code -Customer passwords are no longer stored in clear text during registration.

  • I see, I'll check the extension codes. Thanks! – Bill Dec 8 '14 at 6:52
0

I have a same issue as I am using third party extension for checkout so this issue has to come

I have solved that error by doing following steps

1) in my module I search for confirmation

2) check that it is setting data for customer model

3) then change key to password_confirmation from confirmation

I follow above steps to debug the issue and solved it.

0

My solution was

$confirmation = $this->getPasswordConfirmation(); // test works for Create, fails for Checkout
    if ($password != $confirmation) {
        $confirmation = $this->getConfirmation(); // test works for Checkout fails for Create
        if ($password != $confirmation) {
            $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');
        }
    }
-3

Hi Friends This Problem Can be resolved by doing below steps:

Step 1: Open This file /app/code/core/Mage/Customer/Model/Customer.php
Step 2: Find This line in Customer.php $confirmation = $this->getPasswordConfirmation(); Step 3: Replace That that line with $confirmation = $this->getConfirmation();

Your Problem is now Resolved.

  • 3
    Unless this truly is a core bug, I wouldn't recommend changing core files. – Andrew Kett Jan 1 '15 at 3:16

protected by Community Feb 8 '15 at 6:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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