Manual:Hooks/UserLogoutComplete

Category:MediaWiki hooks#UserLogoutComplete Category:Hooks added in MediaWiki 1.4.0#UserLogoutComplete
UserLogoutComplete
Available from version 1.4.0
Occurs after a user has successfully logged out
Define function:
public static function onUserLogoutComplete( &$user, &$inject_html, $old_name ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserLogoutComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserLogoutComplete"
	}
}
Called from: File(s): specials/SpecialUserLogout.phpCategory:MediaWiki hooks included in SpecialUserLogout.php#UserLogoutComplete
Interface: UserLogoutCompleteHook.php

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

Details

  • $user: the user object after logout (won't have name, ID, etc.)
  • $inject_html: From 1.13, any HTML to inject after the logout success message.
  • $old_name: From 1.13, (r35410) The text of the username that just logged out.

See also

Category:Hooks added in MediaWiki 1.4.0 Category:MediaWiki hooks Category:MediaWiki hooks included in SpecialUserLogout.php