Extension talk:Deleteuser/Archive 1

Unable to find
The code to download it seems to be missing. Where can I find it? LinuxSneaker 17:46, 27 October 2006 (UTC)


 * I cant find it too. Author, can you please put the PHP files in a zip file? Then it will work. Thanks.--Kenny5 00:17, 3 November 2006 (UTC)


 * Done. Nikn 15:51, 3 November 2006 (UTC)

 There seems to be an issue with one of the files, it's acting like there is a syntax error in one of them after I add the file to local settings. I added this to LocalSettings.php: (I added the $IP, thinking that was it.) Thanks Jerry.Lees Hi! Where can i found the file ExtensionFunctions.php. it is not included in the mediawiki 1.8.2 and not included in Deleteuser.zip. every plugin i tested used the unix-way (/) of directory adressing. Not everyone (inclusive me) can work on a Linux-Workstation. Thanks Hchris
 * require_once("$IP/extensions/Deleteuser/SpecialDeleteuser.php");

ExtensionFunctions.php / Adding Special Page
Hi, im using 1.6.8. but i think this applies to 1.8 also. The idea to have a user deletion system is great. However, in the current version, the special page registration seems all wrong which makes the extension faulty. It does not work in my version and I gather from the comments above that it does not work in other versions either. I think first of all maybe you should consider placing the files into the INCLUDES directory rather than the EXTENSION directory of the wiki; then - I am not an expert on this - but it seems to me that following function included in the main extension php file may have to be altered to read something like this:

function wfSpecialDeleteuser { require_once('SpecialPage.php'); #possibly $IP/includes/SpecialPage.php if not set as default path # Add messages global $wgMessageCache ; global $wgMessageCache, $wgDeleteuserMessages; foreach( $wgDeleteuserMessages as $key => $value ) { $wgMessageCache->addMessages( $wgDeleteuserMessages[$key], $key ); }        class XYZ extends SpecialPage {...} # here the class will have to be defined SpecialPage::addPage ( new SpecialPage_DeleteUser('') ) ; #possibly 'sysop' as restriction? }

May someone with more knowledge please comment or help in this matter. Thank you.


 * I'd really love to have this developed more if anyone knowledgeable enough would like to help! Can we get this on SVN? --64.22.206.248 00:29, 20 November 2006 (UTC)

Very buggy interface, log messages screwed up and the main point is that this doesn't work. I tried deleting an user, the message on Special:Deleteuser was  , but the user was still on the user list. -- Sayuri 14:32, 9 May 2007 (UTC)


 * It works with 1.9.3 after you make the $uid to $this->$uid change described on the extension page. -- Christian 12:10, 30 May 2007 (UTC)

Another Option
If you simply delete the user details from user and user_groups it will leave mentions of the users in other tables that may expect the entries to still exist in the user table.

What you could do is to create a (or rename an existing) user as 'Deleted User' and then point all the changes, updates etc at this user.

In the following example the user to delete has user_id of 30 and the 'Deleted User' has a user_id of 40. UPDATE recentchanges SET rc_user = 40,rc_user_text = 'Deleted User' WHERE rc_user = 30; UPDATE revision SET rev_user = 40,rev_user_text = 'Deleted User' WHERE rev_user = 30; UPDATE image SET img_user = 40,img_user_text = 'Deleted User' WHERE img_user = 30; UPDATE oldimage SET oi_user = 40,oi_user_text = 'Deleted User' WHERE oi_user = 30; UPDATE logging SET log_user = 40,log_user_text = 'Deleted User' WHERE log_user = 30;

UPDATE archive SET ar_user = 40,ar_user_text = 'Deleted User' WHERE ar_user = 30; UPDATE filearchive SET fa_user = 40,fa_user_text = 'Deleted User' WHERE fa_user = 30;

You should now be able to delete the user. DELETE FROM user_groups WHERE ug_user = 30; DELETE FROM watchlist WHERE wl_user = 30; DELETE FROM user WHERE user_id = 30; Before you do any of the above make sure you understand what you are doing. Understanding http://upload.wikimedia.org/wikipedia/commons/4/41/Mediawiki-database-schema.png would be a good start.

Iain.