Issue while matching Hash pasword

Issue while matching Hash pasword

by Ashwani M -
Number of replies: 0

Hello Friends,

Please can you help with this issue. I am trying to validate Moodle user on another Site, due to some reasons this new site is different from Moodle site. I have taken taken the mdl_user table and now trying to authenticate user. Consider this:

Entered password = $pass1 = 'some password'

password stored in database = $passhashDB $2y$10$6m.Nwef3FYFd01yA8BHDmuNDppMlGdzPWEa0iWKqzVt9fh7oGejcm

This returns false - password_verify($pass1, $passhashDB)


On Moodle site I printed the password being sent for comparison:

PHP debugger: "$userPassword: $2y$10$3QWVS2QTxOkDCOujp5g3sezbYezHyUfTG3RfykkTgSR4wrj7Fw/5a"

And this returns true: password_verify($pass1, $userPassword)

I am not able to figure out where the code is changing the password from $passhashDB to $usserPassword.

Please can someone help.

Regards,

Ashwani Kumar



Average of ratings: -