Browse Source

Delete table users_history_passwords, etc.

biotorrents 4 years ago
parent
commit
c3e585ffc4
4 changed files with 1 additions and 31 deletions
  1. 0
    8
      gazelle.sql
  2. 0
    6
      sections/login/index.php
  3. 0
    6
      sections/user/take_edit.php
  4. 1
    11
      sections/user/user.php

+ 0
- 8
gazelle.sql View File

@@ -1409,14 +1409,6 @@ CREATE TABLE `users_freeleeches` (
1409 1409
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1410 1410
 
1411 1411
 
1412
-CREATE TABLE `users_history_passwords` (
1413
-  `UserID` int NOT NULL,
1414
-  `ChangeTime` datetime DEFAULT NULL,
1415
-  `ChangerIP` varchar(90) DEFAULT NULL,
1416
-  KEY `User_Time` (`UserID`,`ChangeTime`)
1417
-) ENGINE=InnoDB CHARSET=utf8mb4;
1418
-
1419
-
1420 1412
 CREATE TABLE `users_info` (
1421 1413
   `UserID` int unsigned NOT NULL,
1422 1414
   `StyleID` int unsigned NOT NULL,

+ 0
- 6
sections/login/index.php View File

@@ -84,12 +84,6 @@ if (isset($_REQUEST['act']) && $_REQUEST['act'] === 'recover') {
84 84
                         $UserID
85 85
                     );
86 86
 
87
-                    $DB->query("
88
-                    INSERT INTO `users_history_passwords`
89
-                      (`UserID`, `ChangerIP`, `ChangeTime`)
90
-                    VALUES
91
-                      (?, ?, NOW())", $UserID, Crypto::encrypt($_SERVER['REMOTE_ADDR']));
92
-
93 87
                     $PassWasReset = true;
94 88
                     $LoggedUser['ID'] = $UserID; // Set $LoggedUser['ID'] for logout_all_sessions() to work
95 89
                     logout_all_sessions();

+ 0
- 6
sections/user/take_edit.php View File

@@ -311,12 +311,6 @@ if ($ResetPassword) {
311 311
     $ChangerIP = Crypto::encrypt($LoggedUser['IP']);
312 312
     $PassHash = Users::make_sec_hash($_POST['new_pass_1']);
313 313
     $SQL.= ",m.PassHash = '".db_string($PassHash)."'";
314
-
315
-    $DB->query("
316
-      INSERT INTO users_history_passwords
317
-        (UserID, ChangerIP, ChangeTime)
318
-      VALUES
319
-        (?, ?, NOW())", $UserID, $ChangerIP);
320 314
 }
321 315
 
322 316
 if (isset($_POST['resetpasskey'])) {

+ 1
- 11
sections/user/user.php View File

@@ -557,12 +557,6 @@ $OverallRank = UserRank::overall_score($UploadedRank, $DownloadedRank, $UploadsR
557 557
       </ul>
558 558
     </div>
559 559
     <?php
560
-  if (check_perms('users_mod', $Class) || check_perms('users_view_ips', $Class) || check_perms('users_view_keys', $Class)) {
561
-      $DB->query("
562
-      SELECT COUNT(*)
563
-      FROM users_history_passwords
564
-      WHERE UserID = '$UserID'");
565
-      list($PasswordChanges) = $DB->next_record();
566 560
      if (check_perms('users_view_ips', $Class)) {
567 561
           $DB->query("
568 562
         SELECT COUNT(DISTINCT IP)
@@ -587,9 +581,6 @@ $OverallRank = UserRank::overall_score($UploadedRank, $DownloadedRank, $UploadsR
587 581
       }
588 582
      if (check_perms('users_mod', $Class)) {
589 583
           ?>
590
-        <li>Passwords: <?=number_format($PasswordChanges)?> <a
591
-            href="userhistory.php?action=passwords&amp;userid=<?=$UserID?>"
592
-            class="brackets">View</a></li>
593 584
         <li>Stats: N/A <a
594 585
             href="userhistory.php?action=stats&amp;userid=<?=$UserID?>"
595 586
             class="brackets">View</a></li>
@@ -597,8 +588,7 @@ $OverallRank = UserRank::overall_score($UploadedRank, $DownloadedRank, $UploadsR
597 588
       } ?>
598 589
       </ul>
599 590
     </div>
600
-    <?php
601
-  } ?>
591
+
602 592
     <div class="box box_info box_userinfo_personal">
603 593
       <div class="head colhead_dark">Personal</div>
604 594
       <ul class="stats nobullet">

Loading…
Cancel
Save