define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "363");
+define('CURR_SVN_REVISION', "364");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Store it in session
set_session('mxchange_admin_failtures', $data['login_failtures']);
set_session('mxchange_admin_last_fail', $data['last_failture']);
- } // END - if
- // Update password
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
- array($data['password'], $admin_login), __FILE__, __LINE__);
+ // Update password and reset login failtures
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
+ array($data['password'], $admin_login), __FILE__, __LINE__);
+ } else {
+ // Update password
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE login='%s' LIMIT 1",
+ array($data['password'], $admin_login), __FILE__, __LINE__);
+ }
// Rebuild cache
REBUILD_CACHE("admins", "admin");
SQL_FREERESULT($result);
}
- //* DEBUG: */ echo __FUNCTION__.":".$pass."(".strlen($pass).")/".$password."(".strlen($password).")<br />\n";
+ //* DEBUG: */ echo __FUNCTION__.":".generatePassString($pass)."(".strlen($pass).")/".$password."(".strlen($password).")<br />\n";
// Check if password matches
if (($ret == "pass") && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) {