https://bugzilla.wikimedia.org/show_bug.cgi?id=44165

--- Comment #2 from T. Gries <[email protected]> ---
reported by asked Jan 15 at 17:50 angrybirderer57661 and copied to here from
http://stackoverflow.com/questions/14343703/autopromote-users-when-they-link-an-openid-to-their-account
:


"I'm using MediaWiki with the OpenID extension, and would like the wiki to
autopromote users that link their OpenID(s) to their editing accounts, and
autorevoke them if there are no linked OpenIDs. I know the MediaWiki syntax for
autopromotion, but do not know the event ID triggered when an OpenID is
linked/unlinked."


To achieve this feature, the OpenID extension needs to have hooks.

What are hooks?

Hooks in MediaWiki are events subscription facilities: they are arrays of
functions to call when a specific event occurs.

For example, the UserSetEmail hook will allow any functions to be called when
an user sets a email. More information about hooks.

We need OpenID extension hooks.

As soon UserSetOpenID and UserUnsetOpenID hooks will be available, you will be
able to add your autopromotion code in a function, called by these hooks:

$wgHooks['UserSetOpenID'][] = 'PromoteUserOnOpenID';

function PromoteUserOnOpenID ( $user, &$OpenID ) {
    //The promotion code
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to