}
}
- //* DEBUG: */ echo "*".$pass."/".md5($password)."/".$ret."<br />";
+ /* DEBUG: */ echo "*".$pass."/".md5($password)."/".$ret."<br />";
if ((strlen($pass) == 32) && ($pass == md5($password))) {
// Generate new hash
$pass = generateHash($password);
$salt = __SALT;
// Check if password is same
+ //* DEBUG: */ echo "*".$ret.",".$pass.",".$password.",".$salt."*<br >\n";
if (($ret == "pass") && ($pass == generateHash($password, $salt)) && (!empty($salt))) {
// Change the passord hash here
$pass = generateHash($password);
} elseif ((empty($salt)) && ($ret == "pass")) {
// Something bad went wrong
$ret = "failed";
+ } elseif ($ret == "done") {
+ // Try to login here if we have the old hashing way (sql_patches not installed?)
+ if (!LOGIN_ADMIN($admin_login, $pass)) {
+ // Something went wrong
+ $ret = "failed";
+ }
}
// Return the result
+ //* DEBUG: */ die("RETURN=".$ret);
return $ret;
}