I'm not trying to create a plugin for moodle, I'm simply creating an external script that checks the credentials a user enters into a form against the user table in a moodle database.
Right now in the script, it the username matches, but the password doesn't. I've read some information about moodle using salting, but I'm still not getting any luck.
I'm using something like this to check the password.
$salt = 'random string of chars found in config file';
$password = md5($_POST['password'].$salt);
$query = "SELECT * FROM `user` WHERE password = '$password';";
...
Any suggestions would be greatly appreciated.
select * from user where password=MD5('your-passwordsalt');and see what happens? Are you sure the column name isuserand notmdl_user?