Magento – Forget password link expire, password is updated

magento-1.9

I'm working in magento 1.9.0.1 which has issue with confirm password not match in checkout as guest.

I tried to fix it with following code being provided by StackExchange Magento1.9.1 Please make sure your password match issue

$confirmation = $this->getConfirmation();
$passwordconfirmation = $this->getPasswordConfirmation();
//if ($password != $confirmation) {
if (!(($password == $confirmation) ||
    ($password == $passwordconfirmation))) {
    $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');
}

When I use "forget password" to reset the password it breaks the first time, but after reload it shows Cannot save a new password.
Your password reset link has expired.
but also includes Your password has been updated.

Best Answer

After reading comments and the linked StackExchange(which derives from a 3rd party module).

In Magento 1.9.1.1 the changepasswordAction controller is changed from setConfirmation($password) to setPasswordConfirmation($password).

If you are still in Magento 1.9.0.1 then you need to make sure your 3rd modules need check the $customer->getConfirmation()