0

I have a problem with customer password reset in Magento 2.2.6
After pressing forgot password it send me an email " Set a New Password link "

but when i am trying to set new password i got a message

Something went wrong while saving the new password.

Here a Pic of error message

Also i checked

var/logs

But i dont have any problem with this all kind of emails setting are correct..
Any suggest?

  • Can you check the log files? – Sukumar Gorai Oct 8 '18 at 14:24
  • as i said i've already checked but no errors there :/ – darkattack Oct 8 '18 at 14:30
  • Please check my answer and let me know if issue not solve. – Rohan Hapani Oct 8 '18 at 14:48
  • did you add custom module? try to disable one by one your custom module and try again, maybe something in your custom module did it (custom module that works for customer module) – Edwin Widhiyanto Oct 9 '18 at 2:59
2

This is a bug in Magento 2.2.6 and Magento 2.2.7. Go to the file vendor/magento/module-customer/Model/AccountManagement.php and patch it like this:

       Fix M2.2.7 - MAGETWO-96079: Cannot update password using received link

diff --git a/Model/AccountManagement.php b/Model/AccountManagement.php
index 8f25651..b5b1905 100644
--- a/Model/AccountManagement.php
+++ b/Model/AccountManagement.php
@@ -670,8 +670,8 @@ class AccountManagement implements AccountManagementInterface
         $customerSecure->setRpTokenCreatedAt(null);
         $customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
         $this->getAuthentication()->unlock($customer->getId());
-        $this->sessionManager->destroy();
         $this->destroyCustomerSessions($customer->getId());
+        $this->sessionManager->destroy();
         $this->customerRepository->save($customer);

         return true;

More info:

https://github.com/magento/magento2/commit/7443dc3194040e9ce2f7baf902470deb975b97c6 https://github.com/magento/magento2/issues/18256

0

Try to execute this query in your database. It's just for temporary solution :

UPDATE `customer_entity`
SET `password_hash` = CONCAT(SHA2('xxxxxxxxYOURPASSWORD', 256), ':xxxxxxxx:1')
WHERE `entity_id` = add_your_customer_id_here;

Where The xxxxxxxx character sequence is a cryptographic salt, it is saved in app\etc\env.php file

<?php
return array (
  ...
  'crypt' => 
  array (
    'key' => '5bb9352691e3aea2ae49ae5229f5c83a', //cryptographic salt
  ),
  ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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