error occurred, or one of the hooks handled the action already). Checking the
return value matters more for "before" hooks than for "complete" hooks.
-Hooks::run() was added in MediaWiki 1.18, before that the global function
-wfRunHooks must be used, which was deprecated in MediaWiki 1.25.
-
Note that hook parameters are passed in an array; this is a necessary
-inconvenience to make it possible to pass reference values (that can be changed)
-into the hook code. Also note that earlier versions of wfRunHooks took a
-variable number of arguments; the array calling protocol came about after
-MediaWiki 1.4rc1.
+inconvenience to make it possible to pass reference values (which can be changed)
+by the hook callback.
==Events and parameters==
$user: The User object being authenticated against, or null if authentication
failed before getting that far.
$username: A guess at the user name being authenticated, or null if we can't
- even determine that.
+ even determine that. When $user is not null, it can be in the form of
+ <username>@<more info> (e.g. for bot passwords).
+$extraData: An array (string => string) with extra information, intended to be
+ added to log contexts. Fields it might include:
+ - appId: the application ID, only if the login was with a bot password
'AuthPluginAutoCreate': DEPRECATED since 1.27! Use the 'LocalUserCreated' hook
instead. Called when creating a local account for an user logged in from an
'GetPreferences': Modify user preferences.
$user: User whose preferences are being modified.
&$preferences: Preferences description array, to be fed to an HTMLForm object
-$context: IContextSource object (added in 1.33)
'GetRelativeTimestamp': Pre-emptively override the relative timestamp generated
by MWTimestamp::getRelativeTimestamp(). Return false in this hook to use the