Extension:NewUserMessage/Hooks/CreateNewUserMessage

From Linux Web Expert

Revision as of 00:17, 22 March 2020 by imported>Shirayuki (update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CreateNewUserMessage
Available from version ??? (phab:rENUM2bff22050b155d1a2a0ddd9538ebcc436e3e80a9)
Removed in version phab:rENUM705c757d75bd7f552c323bc8dd6e4ef90eb25ad4
Override the native NewUserMessage message
Define function:
public static function onCreateNewUserMessage( $user, $editor, $editSummary, $substitute, $signature ) { ... }
Attach hook:
$wgHooks['CreateNewUserMessage'][] = 'MyExtensionHooks::onCreateNewUserMessage';
Called from:File(s): NewUserMessage / NewUserMessage.class.php

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

Details

  • $user: the user object who's talk page is being created
  • $editor: the user that we'll use to leave the message
  • $editSummary: the edit summary
  • $substitute: boolean, true if template substitution is to take place
  • $signature: signature