/** * Get the User being used for this instance. * ApiBase extends ContextSource as of 1.19. * * @since 0.1 * * @return User */ public function getUser() { return method_exists('ApiBase', 'getUser') ? parent::getUser() : $GLOBALS['wgUser']; }