Geek Projects – Linux, Apache, MySQL, PHP, DNS A Linux Sysadmin

August 28, 2009

Allowing @ Signs in MediaWiki User Names

Filed under: Web Development — Matt @ 1:56 pm

If you attempt to create a new MediaWiki account with its user name set to the same as the email address, you’ll be greeted by a cryptic “You have not specified a valid user name” error message. The reason for this is that MediaWiki forbids the @ sign in user names by default. Fortunately, the fix is easy, but took some Googling to find buried in MediaWiki’s 1.15 Release Notes.

To fix this, open your MediaWiki’s LocalSettings.php file, and add the following lines:

# enable user names with an @ sign
$wgInvalidUsernameCharacters = "";

Note that having an @ sign within a MediaWiki account’s user name can cause issues with InterWiki User Rights, but this shouldn’t be an issue for most MediaWiki installs.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress