summaryrefslogtreecommitdiff
path: root/maintenance/removeUnusedAccounts.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/removeUnusedAccounts.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/removeUnusedAccounts.php')
-rw-r--r--maintenance/removeUnusedAccounts.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/maintenance/removeUnusedAccounts.php b/maintenance/removeUnusedAccounts.php
index b4528ca0..16cb17ab 100644
--- a/maintenance/removeUnusedAccounts.php
+++ b/maintenance/removeUnusedAccounts.php
@@ -23,7 +23,7 @@
* @author Rob Church <robchur@gmail.com>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that removes unused user accounts from the database.
@@ -74,9 +74,12 @@ class RemoveUnusedAccounts extends Maintenance {
# If required, go back and delete each marked account
if ( $count > 0 && $this->hasOption( 'delete' ) ) {
- $this->output( "\nDeleting inactive accounts..." );
+ $this->output( "\nDeleting unused accounts..." );
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'user', array( 'user_id' => $del ), __METHOD__ );
+ $dbw->delete( 'user_groups', array( 'ug_user' => $del ), __METHOD__ );
+ $dbw->delete( 'user_former_groups', array( 'ufg_user' => $del ), __METHOD__ );
+ $dbw->delete( 'user_properties', array( 'up_user' => $del ), __METHOD__ );
$dbw->delete( 'logging', array( 'log_user' => $del ), __METHOD__ );
$dbw->delete( 'recentchanges', array( 'rc_user' => $del ), __METHOD__ );
$this->output( "done.\n" );
@@ -124,4 +127,4 @@ class RemoveUnusedAccounts extends Maintenance {
}
$maintClass = "RemoveUnusedAccounts";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;