Gebruiker:Lode/Uitzoeken verwijderen gebruikers
Uit 3Dwiki
Ga naar de hoofdpagina Gebruiker:Lode
Er bestaat een extensie voor, maar die is nog buggy. Deze tekst geeft een alternatief (origineel op [1]):
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.
Ik moet dit maar eens goed gaan uitzoeken. --Lode 26 aug 2007 19:55 (CEST)

