Status: http://www.mediawiki.org/wiki/Manual:Hooks/AddNewAccount is currently the only Account-adminstration related hook which changes table user - as far as I can see.
Problem (solved yesterday) OpenID needs to be informed when an account is deleted or merged, which currently UserMerge extension does. There are no core functions for - Deletion or - Merging of accounts.
This is reason why I added in UserMerge (declared myself as the new maintainer for this, if nobody contests) two hooks
- DeleteAccount - MergeAccountFromTo
The two hooks are used in OpenID only, for the moment. I did not yet create corresponding new hook description pages on MediaWiki - because the hooks are currently not part of the core.
As suggested some days ago by Ryan Lane - and I support his view - such hooks should
- go/come via the core, and in consequence - via Auth.
The two hooks should be implemented in core as
abstract public function ()
or whatever is conformity to our standards (pls. let me know). If you choose other names, I will commit corresponding changes in OpenID and UserMerge.
Looking forward to your feedback, Tom
hooks come from http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89010 hooks are consumed in http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89014
P.S. The OpenID and UserMerge extensions run on MediaWiki trunk version with recent PHP 5.3.6. Who wants to test it (URL on request)
As suggested some days ago by Ryan Lane - and I support his view - such hooks should
- go/come via the core, and in consequence
- via Auth.
The two hooks should be implemented in core as
abstract public function ()
or whatever is conformity to our standards (pls. let me know). If you choose other names, I will commit corresponding changes in OpenID and UserMerge.
I suggested no such thing. We were talking about something completely unrelated. Unless MediaWiki supports user deletion and merging, this should not be in core. The hooks should go in the extension that provides the functionality.
- Ryan
Am 28.05.2011 23:00, schrieb Ryan Lane:
hooks should
- go/come via the core, and in consequence
- via Auth.
We were talking about something completely unrelated. Unless MediaWiki supports user deletion and merging, this should not be in core. The hooks should go in the extension that provides the functionality.
Hi Ryan,
then I understood you, let's say, partially. Your last sentence clarifies the situation in that you indirectly confirm, that the introduction of the two hooks DeleteAccount and MergeAccountFromTo (in UserMerge and in OpenID extensions) is -currently- the correct and only way.
Questions, because I could not learn this from the Core documentation, hook related pages:
- Are the hook names I introduced, and the coding of the hooks in conformity to your MW coding standards? - Should these (non-core) extensions' hooks get also dedicated description pages on MW?
When you visit the Extension:UserMerge and Extension:OpenID pages you will find two Categorie links in red. I am unsure to create these pages, because the hooks are not in core but in the extensions. Perhaps someone can write about this (it's a style and coding standards' issue, I think) on MW?
Thanks for assisting me so far.
Tom - maintainer of OpenID extension
P.S. is there anyone already using the current OpenID extension, I need your feedback. If you find problems, I appreciate to file a bug under http://preview.tinyurl.com/openid-filebug = https://bugzilla.wikimedia.org/buglist.cgi?component=OpenID as I now strictly use this system.
http://www.mediawiki.org/wiki/Extension:OpenID http://preview.tinyurl.com/openid-bugs http://preview.tinyurl.com/openid-codereview
then I understood you, let's say, partially. Your last sentence clarifies the situation in that you indirectly confirm, that the introduction of the two hooks DeleteAccount and MergeAccountFromTo (in UserMerge and in OpenID extensions) is -currently- the correct and only way.
If the extension provides the functionality related to the hook, the hook should be called from the extension. It's the only thing that makes sense, since core doesn't provide the functionality.
Questions, because I could not learn this from the Core documentation, hook related pages:
- Are the hook names I introduced, and the coding of the hooks in
conformity to your MW coding standards?
I'm not sure we have standards on hook names (someone please correct me, if this isn't the case).
- Should these (non-core) extensions' hooks get also dedicated
description pages on MW?
They should likely be documented on the page of the extension to which you are adding the hook.
- Ryan
On Sun, May 29, 2011 at 6:41 PM, Ryan Lane rlane32@gmail.com wrote:
I'm not sure we have standards on hook names (someone please correct me, if this isn't the case).
In core, there certainly is no naming convention for hooks. Some are verb phrases, some are noun phrases. I think if you're adding a hook to an extension you should prefix it with something unlikely to conflict with a core hook (now or in the future).
I believe some extensions do something like "ExtensionName::HookName" but I don't think this is widely enforced.
-Chad
On 11-05-29 03:48 PM, Chad wrote:
On Sun, May 29, 2011 at 6:41 PM, Ryan Lane rlane32@gmail.com wrote:
I'm not sure we have standards on hook names (someone please correct me, if this isn't the case).
In core, there certainly is no naming convention for hooks. Some are verb phrases, some are noun phrases. I think if you're adding a hook to an extension you should prefix it with something unlikely to conflict with a core hook (now or in the future).
I believe some extensions do something like "ExtensionName::HookName" but I don't think this is widely enforced.
-Chad
Since this is generic functionality I prefer the generic names anyways myself... Just in case someone goes and creates another tool to merge or delete users, we'd want it to re-use the hook name.
Chad wrote:
On Sun, May 29, 2011 at 6:41 PM, Ryan Lane rlane32@gmail.com wrote:
I'm not sure we have standards on hook names (someone please correct me, if this isn't the case).
In core, there certainly is no naming convention for hooks. Some are verb phrases, some are noun phrases. I think if you're adding a hook to an extension you should prefix it with something unlikely to conflict with a core hook (now or in the future).
I believe some extensions do something like "ExtensionName::HookName" but I don't think this is widely enforced.
-Chad
Given that these are generic hook names, I think it is fine with the current names and they should get that wiki pages documentation (with the proper note that the action is currently only done by UserMerge).
Note that the hook parameters (which I haven't reviewed) should be general enough for the target action (ie. not specific to UserMerge).
Am 30.05.2011 01:05, schrieb Platonides:
Chad wrote:
On Sun, May 29, 2011 at 6:41 PM, Ryan Lane rlane32@gmail.com wrote:
I'm not sure we have standards on hook names (someone please correct me, if this isn't the case).
In core, there certainly is no naming convention for hooks. Some are verb phrases, some are noun phrases. I think if you're adding a hook to an extension you should prefix it with something unlikely to conflict with a core hook (now or in the future).
I believe some extensions do something like "ExtensionName::HookName" but I don't think this is widely enforced.
-Chad
Given that these are generic hook names, I think it is fine with the current names and they should get that wiki pages documentation (with the proper note that the action is currently only done by UserMerge).
Note that the hook parameters (which I haven't reviewed) should be general enough for the target action (ie. not specific to UserMerge).
I just found this is a good place to add my new two hooks (soon later)
--> http://www.mediawiki.org/wiki/Extension_hook_registry
Tom
wikitech-l@lists.wikimedia.org