Extension:Minimum Name Length

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
Minimum Name Length

Release status:Extension status stable

ImplementationTemplate:Extension#type User identity
DescriptionTemplate:Extension#description Allows to enforce a minimum username length during account creation
Author(s)Template:Extension#username Rob Church (Robchurchtalk)
Latest versionTemplate:Extension#version 2.0.1 (2017-07-05)
MediaWikiTemplate:Extension#mediawiki 1.27+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license BSD 2-clause "Simplified" License
Download
README
CHANGELOG
ParametersTemplate:Extension#parameters
  • $wgMinimumUsernameLength
Hooks usedTemplate:Extension#hook
AbortNewAccountManual:Hooks/AbortNewAccount

Translate the Minimum Name Length extension if it is available at translatewiki.net

Check usage and version matrix.

The Minimum Name Length extension allows to set a minimum length for user names which will be enforced during account creation.

Installation[edit]

  • Download and place the file(s) in a directory called MinimumNameLength in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MinimumNameLength' );
    
  • Configure as required
  • YesY Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.27 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.27 and earlier), instead of wfLoadExtension( 'MinimumNameLength' );, you need to use:

require_once "$IP/extensions/MinimumNameLength/MinimumNameLength.php";

Configuration[edit]

To configure the minimum name length for a username, set $wgMinimumUsernameLength in the "LocalSettings.php" file, after the call to include the extension as described in the installation section, e.g.

$wgMinimumUsernameLength = 8;
10 is the default setting. In case you are fine with this you do not need to do anything.