* installer: show realpath when asking to chmod g+w ./config
* installer: hide errors returned when trying to dl() mysql.so / pgsql.so
* installer: cleanly outputbuffer when dieing out
+* Add $wgReservedUsernames configuration directive to block account creation/use
== Compatibility ==
*/
$wgAllowDisplayTitle = false ;
+/**
+ * Array of usernames which may not be registered or logged in from
+ * Maintenance scripts can still use these
+ */
+$wgReservedUsernames = array( 'MediaWiki default', 'Conversion script' );
+
?>
global $wgUser, $wgOut;
global $wgEnableSorbs, $wgProxyWhitelist;
global $wgMemc, $wgAccountCreationThrottle, $wgDBname;
- global $wgAuth, $wgMinimalPasswordLength;
+ global $wgAuth, $wgMinimalPasswordLength, $wgReservedUsernames;
// If the user passes an invalid domain, something is fishy
if( !$wgAuth->validDomain( $this->mDomain ) ) {
$name = trim( $this->mName );
$u = User::newFromName( $name );
- if ( is_null( $u ) || $u->getName() == 'MediaWiki default' ) {
+ if ( is_null( $u ) || in_array( $u->getName(), $wgReservedUsernames ) ) {
$this->mainLoginForm( wfMsg( 'noname' ) );
return false;
}
* @access private
*/
function processLogin() {
- global $wgUser;
- global $wgAuth;
+ global $wgUser, $wgAuth, $wgReservedUsernames;
if ( '' == $this->mName ) {
$this->mainLoginForm( wfMsg( 'noname' ) );
return;
}
$u = User::newFromName( $this->mName );
- if( is_null( $u ) || $u->getName() == 'MediaWiki default' ) {
+ if( is_null( $u ) || in_array( $u->getName(), $wgReservedUsernames ) ) {
$this->mainLoginForm( wfMsg( 'noname' ) );
return;
}