mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Compatibility with OTHire (#330)
* Preparing compatibility to OTHire * Still working on compatibility to OTHire * More compatibility * More compatibility Not tested yet * Some fixes - Fixed Account Creation. - Fixed a problem that you can't load the website, that include that you can now recover your account number. * More fixes - Fixed character creation. - Fixed login problem. - Fixed displaying account number in My Account. - Fixed displaying if you have premium days or not in My Account. * More fixes - Handle Kills/Deaths as TFS_03 * More fixes - Fixed showing outfits in character profile - Fixed displaying player houses in character profile - Fixed displaying guilds * Update init.php
This commit is contained in:

committed by
Stefan A. Brannfjell

parent
0d51f87c76
commit
2817010781
@@ -98,11 +98,11 @@ require '../engine/function/users.php';
|
||||
$updated_acc += 1;
|
||||
|
||||
// Fetch unsalted password
|
||||
if ($config['TFSVersion'] == 'TFS_03' && $config['salt'] === true) {
|
||||
if ($config['ServerEngine'] == 'TFS_03' && $config['salt'] === true) {
|
||||
$password = user_data($old, 'password', 'salt');
|
||||
$p_pass = str_replace($password['salt'],"",$password['password']);
|
||||
}
|
||||
if ($config['TFSVersion'] == 'TFS_02' || $config['salt'] === false) {
|
||||
if ($config['ServerEngine'] == 'TFS_02' || $config['salt'] === false) {
|
||||
$password = user_data($old, 'password');
|
||||
$p_pass = $password['password'];
|
||||
}
|
||||
@@ -110,8 +110,8 @@ require '../engine/function/users.php';
|
||||
// Verify lenght of password is less than 28 characters (most likely a plain password)
|
||||
if (strlen($p_pass) < 28 && $old > 1) {
|
||||
// encrypt it with sha1
|
||||
if ($config['TFSVersion'] == 'TFS_02' || $config['salt'] === false) $p_pass = sha1($p_pass);
|
||||
if ($config['TFSVersion'] == 'TFS_03' && $config['salt'] === true) $p_pass = sha1($password['salt'].$p_pass);
|
||||
if ($config['ServerEngine'] == 'TFS_02' || $config['salt'] === false) $p_pass = sha1($p_pass);
|
||||
if ($config['ServerEngine'] == 'TFS_03' && $config['salt'] === true) $p_pass = sha1($password['salt'].$p_pass);
|
||||
|
||||
// Update their password so they are sha1 encrypted
|
||||
mysql_update("UPDATE `accounts` SET `password`='$p_pass' WHERE `id`='$old';");
|
||||
|
Reference in New Issue
Block a user