Extension:NoBogusUserpages

What can this extension do?
This extension implements a restriction that allows only privileged users to create userpages for non-existent users. With this extension installed, new page creation at the root level of the     namespace is blocked unless the creator's username is the same as the desired page name or the user has been assigned the createbogususerpage right (see user rights below for how to do that). Without this extension, anyone with the right to create pages in the user namespace can create bogus pages for users who do not exist on the wiki.

If you are using MediaWiki 1.12 or newer, it will also display a proper access error instead of a generic error.

Download instructions
Please cut and paste the code found below to the locations specified by the section names.

Installation
To install this extension, add the following line to nearly the bottom of your LocalSettings.php:

To display a description of the right on Special:ListGroupRights, add the following text to MediaWiki:Right-createbogususerpage on your wiki: Create user pages for users who are not registered on this wiki

Alpha Warning
The hook was added in MediaWiki 1.12a (r26568), before then  is the hook to use.

We use version testing to tell us if we are inside of MediaWiki 1.12a or are in a version previous to 1.12. Unfortunately, this does not tell us if the wiki is running the alpha revision which has the new hook. And because of this, if you are running MediaWiki 1.12a, but you are running a version before r26568, this extension could actually be a security flaw. Meaning, it is possible that in MediaWiki 1.12a, before r26568 the extension will allow any user to create a userpage for a bogus user, even if you disallow page creation for them in general. (So even an anon who is not allowed to create any pages, but can edit, will be able to create bogus userpages as a result of this)

If you are running MediaWiki 1.12, please upgrade to r26568 or newer, apply r26568 as a patch to your code. Or hack the extension to only use the 'userCan' and false values in the code.

User rights

 * createbogususerpage
 * Allows users to create bogus userpages. By default this is given just to sysops.