I'm using 1.21 but I'm using an external db to authenticate users using an
extended class of AuthPlugin. The only problem is that I need our userid's
to match up with MediaWiki's mId. At the moment on every API call that
returns mId I have to do a query to external_user table which is the map
for mId -> userid. This isn't practical to do and adds more overhead than
is necessary. What's even worse is that the extenal_user table is
completely removed in 1.22 in this commit:
https://gerrit.wikimedia.org/r/#/c/54900/3 I emailed Chad asking what
options I have, he didn't know and directed me here.
Is there a way to override the User object? I see that there's an
AuthPluginUser in the AuthPlugin.php but there's no documentation as to
actually what this is, or does. I'm assuming this isn't what I need because
there's instances where the User class is called statically.
Alternatively is there a way to override the mId upon user creation so that
I can use our userid for mId? Assuming I can just remove the AUTO_INCREMENT
on the user table to get this to work. I've tried modifying updateUser to
set mId but then function calls like $wgUser->getEdittoken() will return an
Invalid Token, which is understandable. I could just edit User.php but I'd
rather not as it'd make upgrading more tedious to do.
Pretty much the only reason I need to do this is because our usernames
don't follow the same standards that MediaWiki enforces, eg: Names don't
have to start with a capital, and can contain spaces. But having our
userid's available in API calls would be more beneficial.
--
Jamie Taniguchi
Neo Era Media, Inc.
taniguchij(a)neoseeker.com / tekmosis(a)neoseeker.com
Twitter: tekmosis