Could this work with version 1.25?@Bmrberlin
About this board
Could this work with version 1.25?
UserMerge logs every merger, which usually makes sense and is a good functionality. However sometimes you don't want the merge to be displayed (e.g. when you use it to get GDPR compliance, by merging users into a 'DeletedUser' or similar). In that case you do not want the old username to appear in any log, since the point is to remove all that user's personal data (including his username).
Is there a possibility to switch logging of in LocalSettings or vial button in the UserMerge menu?
Yes, it would be nice to have something like
$wgUserMergeNoLog = true;
What I did as a temporary Workaround, I went into the files that create the logs and replaced the (first?) username for all merges with 'merged user' und 'deleted user' for the deletions.
With a switch would be nicer, but that is a possibility. Maybe if I have some time, imma implement a simple if-case for a variable like that and do a PR.
Feature Request: User Page Redirect?
Would it be possible to add an automatic redirect to the User page and User talk page? It would be good that things remain connected.
Is there a way to restore a deleted user?
no, the user to be merged is deleted from the user table. the person will have to recreate the account, everything will have been lost. be careful when using this.
OK, let's say that I want to get rid of a swath of spambot accounts from my wiki by using this tool. I can do that one at a time, but the problem is that there are over 9000 junk accounts that I want to get rid of, and yet doing it one per user is way too tedious. Blakegripling ph (talk) 08:12, 30 June 2012 (UTC)
I've too had a need for such a tool, so I've been working on a version of UserMergeAndDelete which can do mass merging to get rid of all the spam accounts on my AmigaCoding wiki. It's still experimental, though it works (just merged 488 accounts with it). It works by entering/copy&pasting a list of usersnames which can be comma-seperated or have each username on a new line (on each line ignore the part after a tab character so I can copy&paste from MySqlAdmin and remove the first columns using blockselection in a texteditor and columns after the username can be ignored). If there's interest in it I might place it only somewhere this month. Spellcoder (talk) 02:19, 14 August 2012 (UTC)
My wiki hasn't been swamped with junk accounts lately, but I might find some use for this, and also in that OSX86 wiki to which I'm an administrator.
i am interested too plz post thx Mario
I have a little awkward way to accomplish the bulk merge through a work-around. Hope someone would find it useful! (Must have a little string concatenation skills in spreadsheets; or one may use a python or similar script; or use a text editor with bulk replacement features)
1. Prepare a list of all SPAMuserIDs, store them in a spreadsheet or textfile.
2. The post method used for submitting the Merge & Delete User form (by clicking the button) should be converted to a get method. This will get us a long URL. See the second comment (by Matthew Simoneau) dated 13/Jan/2009) at http://www.mathworks.com/matlabcentral/newsreader/view_thread/242300 for the method.
The resulting URL string should be something like below:
- http: //(Your Wiki domain)/Special:UserMerge?olduser=(OldUserNameHere)&newuser=(NewUserNameHere)&deleteuser=1&token=0d30d8b4033a9a523b9574ccf73abad8%2B\
2. Now, divide this URL into four sections:
- A: http: //(Your Wiki domain)/Special:UserMerge?olduser=
- B: (OldUserNameHere)
- C: &newuser=(NewUserNameHere)&deleteuser=1
- D: &token=0d30d8b4033a9a523b9574ccf73abad8%2B\
3. Now using a text editor or spreadsheet, prefix each spam userIDs with part A and Suffix each with Part C and D. Part C will include the NewUser(which is a specially created single dummy userID). The Part D, the Token string is a session-dependent token that will be changed per user per session. So you will need to get a new token every time a new session/batch of work is required.
4. With the above step, you should get a long list of URLs, each good to do a Merge&Delete operation for one user. We can now create a simple HTML file, view it and use a batch downloader like DownThemAll in Firefox.
Add two more pieces "<a href=" and "> Linktext</a>" to each line at beginning and end. Also add <html><body> at top and </body></html> at bottom and save the file as (for eg:) userlist.html
5. Open the file in Firefox, use DownThemAll add-on and download all the files! Effectively, you are visiting the Merge&Delete page for each user and clicking the button!
Although this might look a lengthy and tricky job at first, once you follow this method, you can remove tens of thousands of users without much manual efforts.
You can verify if the operation is going well by opening some of the downloaded html files (or by looking through the recent changes in another window). One advantage is that it does not directly edit the MySQL pages. Nor does it require direct database access. List of spam users may be prepared from the user creation logs. If you do have the dB access, the Wiki_user table can be imported into a local list.
That method looks crude, but it seems 'swell for admins who are getting jaded at the sheer amount of database-wasting spambot accounts.
Thanks Viswaprabha! Here is below a Python script to concatenate the pieces above and produce the html page to use with DownThemAll! By the way, in my case the URL string that worked uses 'Special:UserMerge&olduser=', with an & in that part instead of the ? in your example.
# Concatenate a list of users to produce URLs which delete them using UserMerge Extension for MediaWiki # Usage: python concatenate_UserMerge_MediaWiki.py userslist.txt > userURLlist.html import sys input = open(sys.argv) count = input.readlines() g = len(count) input.close() print "<html><body>" input = open(sys.argv) for k in range(g): line = input.readline() print "<a href=\""+"http://(Your Wiki Domain)/index.php?title=Special:UserMerge&olduser="+line+"&newuser=Anonymous&deleteuser=1"+"&token=2c05d520d9b202235c03e8fe8ll8khB\\\""+">User URL Link</a>" input.close() print "</html></body>"
Yeah the workaround Viswaprabha came up with no longer seems to work. :/
[SOLVED WONTFIX] Fatal error: Call to undefined method User::getEditToken()
I have this error;
Fatal error: Call to undefined method User::getEditToken() in /var/www/lighttpd/vhosts/www.liblfds.org/mediawiki/extensions/UserMerge/UserMerge_body.php on line 148
PHP 5.3.17 (cli) (built: Sep 17 2012 20:19:13) Product Version MediaWiki 1.18.2 PHP 5.3.17 (cgi-fcgi) PostgreSQL 9.2.1
You use an outdated MediaWiki Version 1.18.x, which is no longer supported, see Download. Since version 1.19, the old method editToken() has been deprecated, and the UserMerge extension uses the new name getEditToken(). And you haven't included the version number of the extension - this should be 1.7.2 .
Ad-hoc fix for pre 1.19 MediaWiki versions: it should work if you rename the call in UserMerge_body.php from User::getEditToken() to User::editToken().
Even if this isues is solve, I had to use getEditToken() in 1.27.1 Mediawiki versión
The old and new usernames need to be distinct.
I have problem with UserMerge extension. I want to merge users.
Old user username: "User Name"
New user username: "User_Name"
I want to merge these accounts. But when i tried that, it gives me error: "The old and new usernames need to be distinct."
The old and new usernames already distinct. How i fix that?
This bug is already fixed on master branch.
Following error occured while merging:
[Wgrr4uUSqyqvtDUahBKYCgAAAAk] /mediaWiki/index.php/Spezial:Benutzerkonten_vereinigen Wikimedia\Rdbms\DBQueryError from line 1075 of /usr/share/mediawiki-1.29.1/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: UPDATE IGNORE "user_groups" SET ug_user = '19' WHERE ug_user = '18'
Error: 42P01 FEHLER: Relation »ignore« existiert nicht
LINE 1: UPDATE /* MergeUser::mergeDatabaseTables */ IGNORE "user_gr...
Im using mediawiki 1.29.1; PHP 7.1.10 (apache2handler); PostgreSQL 9.6.5; ICU 57.1 and UserMerge 1.10.1 (de5f67d).
Hello, I have the same issue with MW 1.29.1; PHP 7.0.22-0ubuntu0.16.04.1; MySQL 5.7.20-0ubuntu0.16.04.1-log and UserMerge 1.10.1
Same with me.... MW 1.27.1 PHP 7.0.7 PostgreSQL 9.4.13
I had the same problem with MediaWiki 1.30.
$wgDebugToolbar = true;" I saw the following queries:
UPDATE `watchlist` SET wl_user = '1095' WHERE wl_user = '91'; ROLLBACK;
and in the "Debug log":
- [DBQuery] MergeUser::mergeDatabaseTables localhost 1062 Duplicate entry '1095-0-Aus_der_Satzung_Gefallenes' for key 'wl_user' (localhost) UPDATE `watchlist` SET wl_user = '1095' WHERE wl_user = '91'
So the problem was that both the old and the new users watched the same pages.
Workaround: Find the duplicate entries ("
select old.wl_id, old.wl_namespace, old.wl_title from watchlist old join watchlist new on old.wl_namespace = new.wl_namespace and old.wl_title = new.wl_title where old.wl_user = 91 and new.wl_user = 1095") and delete them before merging the user accounts.
There is an open bug report for this issue.
Fatal error of type DBQueryError
This bug is already fixed on master branch.
When I try to merge two users I get an error:
- [0a2fe910b4519b6b687ee482] 2017-04-09 18:50:36: שגיאה חמורה מסוג "DBQueryError"
The mediawiki version I'm using is 1.28 and I have the right version of usermerge (branch hash: 55971e5dde4ac29783d6eb3c5d49d7b8dcffbc4f).
In the apache log I have the following message:
- [Sun Apr 09 21:50:36.855136 2017] [:error] [pid 9938] [client 22.214.171.124:38691] PHP Notice: Undefined offset: 1 in /var/www/html/w/extensions/UserMerge/MergeUser.php on line 342, referer: https://www.betmidrash.org.il/index.php/%d7%9e%d7%99%d7%95%d7%97%d7%93:%d7%9e%d7%99%d7%96%d7%95%d7%92_%d7%9e%d7%a9%d7%aa%d7%9e%d7%a9%d7%99%d7%9d
any idea why it happens?
This is a bug. I've reported task T162563. If you can control, or can contact one of the two users that are failing to merge, tell him/here to clear the watch list of one of the accounts, until this bug is fixed.
Content moved from Extension.usermerge
Hi, I was using the name shahab since 2007, which was changed to shahab~urwiki in April 2015, as a result of one user one name policy (global account).
I applied for merging my two accounts, shahab~urwiki & شہاب at https://meta.wikimedia.org/wiki/Steward_requests/Username_changes/Pending#Shahab~urwiki@global, but still waiting for merging.
@شہاب, your topic has been moved here.
I think that all requests on that page essentially were declined at phab:T49918#1979870, but it seems that no one ever notified those who posted requests on that page.