Manual:Hooks/UserLogout
From MediaWiki.org
UserLogout | |
---|---|
Available from version 1.4.0 Occurs when the software receives a request to log out |
|
Define function: |
public static function onUserLogout( &$user ) { ... }
|
Attach hook: |
$wgHooks['UserLogout'][] = 'MyExtensionHooks::onUserLogout';
|
Called from: | File(s): SpecialUserlogout.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UserLogout extensions.
Details[edit | edit source]
- $user: the user object that is about to be logged out
- The function called must return true/false, otherwise a MWException is thrown.