Jump to content

Manual:Hooks/UserLoadFromDatabase

From mediawiki.org
UserLoadFromDatabase
Available from version 1.15.0
Removed in version 1.40.0 (Gerrit change 861504)
Called when loading a user from the database.
Define function:
public static function onUserLoadFromDatabase( $user, &$s ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserLoadFromDatabase": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserLoadFromDatabase"
	}
}
Called from: File(s): User.php
Interface: UserLoadFromDatabaseHook.php

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

Details

[edit]
  • $user: user object
  • &$s: database query object