[SUGGESTION] Add extension hooks for OpenID link/unlink
Closed, DeclinedPublic

bzimport set Reference to bz44165.
bzimport created this task.Via LegacyJan 19 2013, 9:44 PM
Wikinaut added a comment.Via ConduitJan 19 2013, 10:08 PM


Wikinaut added a comment.Via ConduitFeb 10 2013, 10:02 AM

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


Wikinaut added a comment.Via ConduitMay 7 2013, 7:05 AM

@bug reporter angrybirderer57661 :

Is this still needed by someone else?

Or can I close the bug ?

Wikinaut added a comment.Via ConduitAug 10 2013, 5:37 PM

no answer thus closing.

Add Comment