diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index cdc88d4f..edb478d5 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -272,7 +272,8 @@ - $OldPassKey = db_string($LoggedUser['torrent_pass']); + $UserInfo = user_heavy_info($UserID); + $OldPassKey = db_string($UserInfo['torrent_pass']); $NewPassKey = db_string(make_secret()); $ChangerIP = db_string($LoggedUser['IP']); $SQL.=",m.torrent_pass='$NewPassKey'"; diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 535c33fe..0ab1b330 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -540,6 +540,10 @@ $HeavyUpdates['torrent_pass']=$Passkey; $Cache->delete_value('user_'.$Cur['torrent_pass']); //MUST come after the case for updating can_leech. + + $DB->query("INSERT INTO users_history_passkeys + (UserID, OldPassKey, NewPassKey, ChangerIP, ChangeTime) VALUES + ('$UserID', '".$Cur['torrent_pass']."', '$Passkey', '0.0.0.0', '".sqltime()."')"); update_tracker('change_passkey', array('oldpasskey' => $Cur['torrent_pass'], 'newpasskey' => $Passkey)); }