7 error_reporting(E_ALL ^ E_NOTICE
);
8 require_once 'commandLine.inc';
10 class checkUsernames
{
13 function checkUsernames() {
14 $this->stderr
= fopen( 'php://stderr', 'wt' );
17 $fname = 'checkUsernames::main';
19 $dbr = wfGetDB( DB_SLAVE
);
21 $res = $dbr->select( 'user',
22 array( 'user_id', 'user_name' ),
27 while ( $row = $dbr->fetchObject( $res ) ) {
28 if ( ! User
::isValidUserName( $row->user_name
) ) {
29 $out = sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id
, $row->user_name
);
30 fwrite( $this->stderr
, $out );
31 wfDebugLog( 'checkUsernames', $out );
37 $cun = new checkUsernames();