Manual:Hooks/UserLoadAfterLoadFromSession

From MediaWiki.org
Jump to navigation Jump to search
UserLoadAfterLoadFromSession
Available from version 1.14.0
Called to authenticate users on external/environmental means; occurs after session is loaded
Define function:
public static function onUserLoadAfterLoadFromSession( $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserLoadAfterLoadFromSession": "MyExtensionHooks::onUserLoadAfterLoadFromSession"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserLoadAfterLoadFromSession'][] = 'MyExtensionHooks::onUserLoadAfterLoadFromSession';
Called from:File(s): User.php

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

Details[edit]

  • $user: user object being loaded