Manual:Hooks/BeforeWelcomeCreation

From MediaWiki.org
Jump to navigation Jump to search
BeforeWelcomeCreation
Available from version 1.18.0 (r86011)
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": "MyExtensionHooks::onBeforeWelcomeCreation"
	}
}

For MediaWiki ≤1.25:

$wgHooks['BeforeWelcomeCreation'][] = 'MyExtensionHooks::onBeforeWelcomeCreation';
Called from:File(s): specials/SpecialUserLogin.php

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

Details[edit]

  • $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 r?).