Extension:PluggableAuth/Hooks/PluggableAuthPopulateGroups

From MediaWiki.org
Jump to navigation Jump to search
PluggableAuthPopulateGroups
Available from version 5.1
called to populate a user's MediaWiki groups from an external provider
Define function:
public static function onPluggableAuthPopulateGroups( User $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"PluggableAuthPopulateGroups": "MyExtensionHooks::onPluggableAuthPopulateGroups"
	}
}

For MediaWiki ≤1.25:

$wgHooks['PluggableAuthPopulateGroups'][] = 'MyExtensionHooks::onPluggableAuthPopulateGroups';
Called from:File(s): PluggableAuth extension

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

Details[edit]

  • User $user: the User object