public function __construct() {
parent::__construct();
- $this->mDescription = "Verify that database usernames are actually valid";
+ $this->addDescription( 'Verify that database usernames are actually valid' );
$this->setBatchSize( 1000 );
}
function execute() {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = $this->getDB( DB_SLAVE );
$maxUserId = 0;
do {
foreach ( $res as $row ) {
if ( !User::isValidUserName( $row->user_name ) ) {
- $this->error( sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id, $row->user_name ) );
+ $this->output( sprintf( "Found: %6d: '%s'\n", $row->user_id, $row->user_name ) );
wfDebugLog( 'checkUsernames', $row->user_name );
}
}