Page MenuHomePhabricator

[Regression] removeUnusedAccounts.php broken (needs to ignore newuser logging entry)
Closed, ResolvedPublic


removeUnusedAccounts.php needs to be revised.
As you know, all new accounts now create a new user log entry.
Therefore removeUnusedAccounts.php will only remove ancient accounts.

This spec,

  • Could the specified user account be deemed inactive?
  • (No edits, no deleted edits, no log entries, no current/old uploads)

Should be revised to

  • (No edits, no deleted edits, no log entries (except for new user log), no current/old uploads)

and the code revised accordingly. Or at least an --option offered.

Also of course the new user log entry should be cleaned up too.

  • All this to make removeUnusedAccounts.php again work as originally intended!

Version: 1.20.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:16 AM
bzimport set Reference to bz34581.

Just hit this same issue with the new user log keeping this useful script from working. +1 vote to address this.

ksee.zelgadis wrote:

Quick fix to the issue

Here's my quick fix for issue (patch based on Mediawiki 1.19.0)

attachment removeUnusedAccounts.patch ignored as obsolete

ksee.zelgadis wrote:

In this version all traces of user also removed from logs

We need to remove all traces of user registration from User and Recent Changes logs. Patch against mediawiki 1.19.0.

attachment removeUnusedAccounts-2.patch ignored as obsolete

sumanah wrote:

Thanks for the patch, Konstantin.

You can use Developer access

to submit this as a Git branch directly into Gerrit:

Thanks again! We appreciate your contribution. Putting your branch in Git makes it easier for us to review it quickly.

buzz wrote:

removeUnusedAccounts.php to ignore newusers logs and also clean logging/recentchanges

Part of the patch didn't apply cleanly on my 1.20 - here is an updated patch.

I was having a lot of automated registrations recently which I wanted to clean up - found this issue after some googling. Seems a relatively important fix as the script is currently non functioning. The patch is also simple, and easy to understand. Any chance someone can sort this ?


Hi Jools, how do you feel about getting developer access and submitting this patch for code review at ?

This is how we are currently taking code contributions. The first time you need some extra steps but then you are all set to submit further contributions straight away. Plus, with developer access you get an option to get your own Labs instance to test your patches in a clean environment, without messing with your local installations.

Have a look:

By the way removeUnusedAccounts.php also removes User:Abuse filter the account for Extension:AbuseFilter.

Patch submitted.

Change-Id: I7761a635261881f5a7ff7aaa8f8513d3d3a2149b