We have a love-hate relationship with passwords, isn’t it?
We like the idea of securing our data or account with passwords but hate to remember them.
Magento 2 store customers feel the same!
A very common feature used by major sites is to reset the password when a user forgets it. Doing so is a win-win situation as the user can continue using your service and you do not lose a potential customer. The cherry on top, you get the medal of good user experience!
Hurray!
So, when you are on the other side of the stage, how do you manage to change the customers’ passwords when they forget them?
Here’s the solution to reset customer password from database in Magento 2. Bookmark this post as it is going to be handy the next time your store customer comes to you requesting for password change.
Method to reset customer password from database in Magento 2:
UPDATE `customer_entity` SET `password_hash` = CONCAT(SHA2('xxxxxxxxENTERCUSTOMERPASSWORD', 256), ':xxxxxxxx:1') WHERE `entity_id` = 1;
That’s it to change the customer password in Magento 2! Tip: Use this cool password generator to set up a strong password!
Simple, isn’t it? Also you can let login your customers programmatically in the Magento 2 store without password, you can make it possible by making them login only with Email ID.
Feel free to share the solution with fellow developers via social media.
Thanks.