'UserLoginComplete': after a user has logged in
$user: the user object that was created on login
+$inject_html: Any HTML to inject after the "logged in" message.
'UserLoginForm': change to manipulate the login form
$template: SimpleTemplate instance for the form
'UserLogoutComplete': after a user has logged out
$user: the user object _after_ logout (won't have name, ID, etc.)
+$inject_html: Any HTML to inject after the "logged out" message.
'UserRights': After a user's group memberships are changed
$user : User object that was changed
# Run any hooks; ignore results
- wfRunHooks('UserLoginComplete', array(&$wgUser));
+ $injected_html = '';
+ wfRunHooks('UserLoginComplete', array(&$wgUser, &$injected_html));
$wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
$wgOut->addWikiText( $msg );
+ $wgOut->addHtml( $injected_html );
if ( !empty( $this->mReturnTo ) ) {
$wgOut->returnToMain( $auto, $this->mReturnTo );
} else {
$wgUser->logout();
$wgOut->setRobotpolicy( 'noindex,nofollow' );
- $wgOut->addHTML( wfMsgExt( 'logouttext', array( 'parse' ) ) );
+
+ // Hook.
+ $injected_html = '';
+ wfRunHooks( 'UserLogoutComplete', array(&$wgUser, &$injected_html) );
+
+ $wgOut->addHTML( wfMsgExt( 'logouttext', array( 'parse' ) ) . $injected_html );
$wgOut->returnToMain();
-}
-
-
+}
\ No newline at end of file
global $wgUser;
if( wfRunHooks( 'UserLogout', array(&$this) ) ) {
$this->doLogout();
- wfRunHooks( 'UserLogoutComplete', array(&$wgUser) );
}
}