Posts

Showing posts with the label yii2-advanced-app

Can't validate password_hash generated in console in front-end

Can't validate password_hash generated in console in front-end I do generatePasswordHash from console to create a user. And when user is created, I can't login. I try to validatePassword but useless - always returns false. But when I do the same generatePasswordHash in front-end part it returns true. Is there any difference between validation or generating hash from console and front-end? generatePasswordHash validatePassword generatePasswordHash There should be the same process for both. It must be something else you are doing. It would help if you paste the code for creating user in console app. – Bizley Jul 1 at 9:36 Are you sure that you're using the same PHP version in console and web app? – rob006 Jul 1 at 12:08 ...