Thank you very much for the reply Max, +1 beer for next time we meet.
On Thu, Mar 27, 2014 at 5:10 PM, MZMcBride <[email protected]> wrote: > Teresa Cho wrote: > >I'm trying to add a feature to Wikimetrics that will allow users to > >create a cohort with a username and find all accounts across wikis. I > >want to use the CentralAuth database, because as far as I can tell, it > >stores the global username and all the local usernames. However, I don't > >see where it connects the globalusers to the localusers. Is it just the > >username? > > > >Does the username have to be the same across local wikis and you query > >the localuser table with what you think is the global username? If that's > >the case, I suppose I don't need to look at the global table. > > Hi. > > Broadly, I think the answer for you're looking for is no: CentralAuth > accounts (global user accounts that match to local user accounts) are not > fully unified on Wikimedia wikis. It's a long-term goal, but it's a > disruptive change to make, so it's taken a while. :-) > > It sounds like you want programmatically retrieve the info from: > <https://www.mediawiki.org/wiki/Special:CentralAuth/Jimbo_Wales>. > > If so, I'd recommend the MediaWiki Web API > (<https://www.mediawiki.org/w/api.php>) for this. Perhaps the > globaluserinfo API module? > https://www.mediawiki.org/w/api.php?action=query&meta=globaluserinfo&guiuse > r=Jimbo+Wales&guiprop=groups|merged|unattached > > If you must directly query the MediaWiki database using SQL, you'll likely > need to read through the source code of the CentralAuth MediaWiki > extension to figure out exactly what the PHP and SQL is doing with the > underlying data. The source code of the CentralAuth MediaWiki extension > can be found here: > <https://git.wikimedia.org/tree/mediawiki%2Fextensions%2FCentralAuth.git>. > You'll likely want to read through central-auth.sql in particular. > > Dan Andreescu wrote: > >Any links to documentation on consuming data from the CentralAuth > >databases is welcome. We searched a bit and found mostly installation > >instructions. > > Well, very generally you (or your program) probably shouldn't be querying > the databases directly, but if you can provide more specific information > about where you looked, we can probably add some redirects for future > w[ao]nderers. > > For general clarity, while I used www.mediawiki.org in the examples in > this e-mail, because the Web API is retrieving global (wiki farm-wide) > data, the equivalent URL paths should work on other Wikimedia wikis such > as en.wikipedia.org or meta.wikimedia.org. > > MZMcBride > > > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
