Manual:Hooks/AfterUserMessage

From MediaWiki.org
Jump to navigation Jump to search
AfterUserMessage
Available from version 1.17.0
Removed in version 1.18.0
After a user message has been left.
Define function:
public static function onAfterUserMessage( $user, $article, $subject, $text, $signature, $summary, $editor ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"AfterUserMessage": "MyExtensionHooks::onAfterUserMessage"
	}
}

For MediaWiki ≤1.25:

$wgHooks['AfterUserMessage'][] = 'MyExtensionHooks::onAfterUserMessage';
Called from:File(s): User.php

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

Details[edit]

  • $user: The user who we left the message for.
  • $article: The article the message was left on.
  • $subject: The subject of the message
  • $text: The text of the message.
  • $signature: The signature we used.
  • $summary: The edit summary.
  • $editor: The editor that performed the edit.