Better error message for invalid user name in cleanupSpam.php
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 14 Feb 2013 07:16:10 +0000 (08:16 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 14 Feb 2013 07:16:10 +0000 (08:16 +0100)
So that one that gets this message does not have to look at
the code to see what is wrong and how to correct it.

Change-Id: I4012ce7db010b9c132e68da9577ba1d5512d13e7

maintenance/cleanupSpam.php

index 9838569..a41423a 100644 (file)
@@ -44,7 +44,7 @@ class CleanupSpam extends Maintenance {
                $username = wfMessage( 'spambot_username' )->text();
                $wgUser = User::newFromName( $username );
                if ( !$wgUser ) {
-                       $this->error( "Invalid username", true );
+                       $this->error( "Invalid username specified in 'spambot_username' message: $username", true );
                }
                // Create the user if necessary
                if ( !$wgUser->getId() ) {