Available from version 1.18.0 (r86011, codereview)
Occurs before a newly created user sees a welcomecreation message
Define function:
public static function onBeforeWelcomeCreation( &$welcomeCreationMsg, &$injectHtml ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"BeforeWelcomeCreation": "MediaWiki\\Extension\\MyExtension\\Hooks::onBeforeWelcomeCreation"
Called from: File(s): specials/SpecialUserLogin.php
Interface: BeforeWelcomeCreationHook.php

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


  • $welcomeCreationMsg: name of the MediaWiki message to display to the user, or NULL. The default in core is welcomecreation-msg.
  • $injectHtml: Any HTML to inject after the login success message for a newly created user (Since MW 1.13).