I have Moodle 2.7. Users logins and passwords hashes is stored in mdl_user table. I want to create external script that can check - if login and password are correct.
As i see - this moodle version use some function php like password_hash() to generate password hash.
My php version is 5.4 so i can't use this function. So i use this library https://github.com/ircmaxell/password_compat with this code
$password_hash = password_hash( $password , PASSWORD_DEFAULT, array());
The problem is that hash is different each time i calculate it. So i cant compare this hash to string that is placed in mdl_user table.