Page MenuHomePhabricator

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


Author: googltakovr


Version: master
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:28 AM
bzimport set Reference to bz44165.

reported by asked Jan 15 at 17:50 angrybirderer57661 and copied to here from :

"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


@bug reporter angrybirderer57661 :

Is this still needed by someone else?

Or can I close the bug ?