I have a string variable, and i want to check if this string variable match with the current customer password, is there a way to do this?
Magento2 – How to Check if Customer Password Matches
customermagento2password
customermagento2password
I have a string variable, and i want to check if this string variable match with the current customer password, is there a way to do this?
Best Answer
Please check this model
In this You will find one method
authenticate($customerId, $password)
You can call this method and pass $customerId, and Password string. If password will be correct then it will return true. Otherwise it will throw an exception.