class SpecialUserList extends SpecialPage { function __construct() { parent::__construct( 'UserList' ); } function execute( $par ) { $this->setHeaders(); $out = $this->getOutput(); $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'user', '*', array() ); $out->addHTML( '
class SpecialUserProfile extends SpecialPage { function __construct() { parent::__construct( 'UserProfile' ); } function execute( $par ) { $this->setHeaders(); $out = $this->getOutput(); $user = $this->getUser(); if ( $user->isAnon() ) { $out->addHTML( 'You must be logged in to view your user profile.' ); return; } $id = $user->getId(); $profile = UserProfile::newFromUserId( $id ); $form = new UserProfileForm( $profile ); if ( $form->handleFormSubmission( $user ) ) { $out->addHTML( 'Your profile has been updated.' ); return; } $out->addHTML( $form->display() ); } }This example allows registered users to create and edit their own profiles, and displays their current profile information. The package library commonly associated with PHP SpecialPage is the MediaWiki core libraries, as this class is specifically designed for MediaWiki websites.