Jump to content

Extension:CentralAuth/Hooks/CentralAuthInfoFields

From mediawiki.org
CentralAuthInfoFields
Available from version 1.43.0 (Gerrit change 1056991)
Allows modification of the information displayed in the 'Global account information' fieldset on Special:CentralAuth.
Define function:
public static function onCentralAuthInfoFields( CentralAuthUser $centralAuthUser, IContextSource $context, array &$attribs ) { ... }
Attach hook:
$wgHooks['CentralAuthInfoFields'][] = 'MyExtensionHooks::onCentralAuthInfoFields';
Called from:File(s): CentralAuth / includes/Special/SpecialCentralAuth.php
Function(s): getInfoFields

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:CentralAuthInfoFields extensions.

Parameters

[edit]
  • $centralAuthUser: The user being viewed on Special:CentralAuth.
  • $context: The context used for the special page, intended to generate messages and get the relevant Authority object.
  • &$attribs: The fields for the 'Global account information' fieldset. The keys are field names, but they are not used in the UI or for generating messages. The values are arrays with the following keys:
    • label: The label for the information which is a Message object or string message key
    • data: The data point about the global account, which should be HTML escaped