Extension:NoBogusUserpages

What can this extension do?
Allows for restriction of creation of bogus userpages to privileged users only.

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 to LocalSettings.php:

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.