如何在MediaWiki中列出所有用户?

I write a MediaWiki extension. I need to get a list of all registered users. In most MediaWiki does not really understand what is and find where the legs grow.

For current logged user i use code:

global $wgUser;
$userId = $wgUser->getId();
$userName = $wgUser->getName();

But I can not yet find how to get a list of all users and their IDs for future use

You will have to query the user table in the databas. Something like this (have a look in the manual linked below for details):

$dbr = wfGetDB( DB_SLAVE );
$id_list = $dbr->select( 'user', 'user_id' );
foreach( $id_list as $user_data ) {
    ...
}

Further reading: