From MediaWiki.org
Jump to: navigation, search

MediaWiki extensions manual
Crystal Clear app error.png

Release status: unstable

Implementation Special page
Description An extension for deleting users from database.
Author(s) Nikn
License No license specified
Download Zipped package
Added rights


Translate the Deleteuser extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

Deleteuser is an extension for deleting users from database.

Installation[edit | edit source]

  1. Download the Extension:ExtensionFunctions.php
  2. Copy the ExtensionFunctions.php to the /extensions/ directory in your MediaWiki folder.
  3. Make /extensions/Deleteuser directory in your MediaWiki folder.
  4. Copy all three extension files to that new directory.
  5. Add this line in LocalSettings.php:

Localization[edit | edit source]

The file SpecialDeleteuser.i18n.php contains arrays for localized versions. For example, a German version could be added that reads as follows

$wgDeleteuserMessages['de'] = array(
        'deleteuser'       => 'Benutzerlöschung',
        'deleteusername'   => 'Benutzername:',
        'deleteusersubmit' => 'Löschen',
        'deleteusererrordoesnotexist' => 'Der Benutzer "$1" existiert nicht',
        'deleteusererrorinvalid'      => 'Der Benutzername "$1" ist ungültig',
        'deleteusersuccess'           => 'Der Benutzer "[[Benutzer:$1|$1]]" (mit $2 Bearbeitungen) wurde gelöscht.',
        'deleteuserlogpage'     => 'Benutzerlöschungs-Logbuch',
        'deleteuserlogpagetext' => 'Dies ist eine Liste der letzten gelöschten Benutzer.',
        'deleteuserlogentry'    => '', # Don't translate this
        'deleteuserlog'         => 'hat Benutzer "[[Benutzer:$1|$1]]" (mit $2 Bearbeitungen) gelöscht',

Using[edit | edit source]

Enter special page Special:Deleteuser, type username and press Delete.

Changelog and known bugs[edit | edit source]

  • 27 October 2006 - published first version of extension.


  • The extension does not work in my environment:
    -MediaWiki 1.6.8 with page access restriction patch
    -PHP: 4.3.4 with MySQL: 4.0.18
    -Extensions Tasks 0.51 and EmbedURL
  • For me, it doesn't work either. It seems to use ExtensionFunctions.php which is not supported after 1.6 see here mwusers.com
    Even after installing it, it didn't work. 8-(
  • There is a bug in the DeleteuserSQL module, in the call to the delete functions. The "$uid" variable is the local instance and need to be changed to the class variable, as below:
$dbw->delete( 'user', array ( 'user_id' => '''$this->uid''' ), $fname );
$dbw->delete( 'user_groups', array ( 'ug_user' => '''$this->uid''' ), $fname );
  • 25 June 2007 - In the i18n file, "$wgRenameuserMessages" was used instead of "$wgDeleteuserMessages" in the array declaration and in the definition of the values for English ('en').
$wgDeleteuserMessages = array();

$wgDeleteuserMessages['en'] = array(

How it works?[edit | edit source]

This extension does these SQL querries:

DELETE FROM `user_groups` WHERE ug_user = here user ID;
DELETE FROM `user` WHERE user_id = here user ID;

See also[edit | edit source]

External links[edit | edit source]