2 error_reporting(E_ALL ^ E_NOTICE
);
3 require_once 'commandLine.inc';
8 function checkUsernames() {
9 $this->stderr
= fopen( 'php://stderr', 'wt' );
12 $fname = 'checkUsernames::main';
14 $dbr = wfGetDB( DB_SLAVE
);
16 $res = $dbr->select( 'user',
17 array( 'user_id', 'user_name' ),
22 while ( $row = $dbr->fetchObject( $res ) ) {
23 if ( ! User
::isValidUserName( $row->user_name
) ) {
24 $out = sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id
, $row->user_name
);
25 fwrite( $this->stderr
, $out );
26 wfDebugLog( 'checkUsernames', $out );
32 $cun = new checkUsernames();