Extension:WikiForum/Hooks/WikiForumSig
For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see Category:WikiForumSig extensions.
The WikiForumSig hook is called in the WikiForum class, when building the user's signature text for a registered (=non-anonymous) user.
By default, the "signature" links to the user's User: page, but for users in the sysop and forumadmin user groups, this group membership is indicated after their name. So if a user called "Foo" is a forum admin, the code would generate a link which looks like this: "Foo (forum administrator)", with the group name linking to the page specified in [[MediaWiki:Grouppage-forumadmin]], just like how it would link on the Special:ListGroupRights page.
You can use this hook to add special handling for other user groups. For example, on a wiki farm you might wish to have special handling for the wiki farm staff user group or other global user groups. Likewise, many wikis also have other, more dedicated local user groups, such as oversighters or CheckUsers who have access to restricted, sensitive moderation tools.
The hook provides access to $user, which is the User object representing the person whose signature is being generated, and &$groupText, which is the link to the user group page, if any; it is an empty string for everyone else except members of the aforementioned sysop and forumadmin user groups.