[MediaWiki-l] Importance of users table user_name database column in display of User Name

Mike Papper bodaro at gmail.com
Thu Jan 31 01:47:02 UTC 2013

One question:

If I keep a sso table that maps a user_id to a row in the users table, I would update Mediawiki's user.user_email column if their email chnaged. Should I do this by a user function? Or can I just update the DB column - and more importantly, if I do just update the user column, should I call some special function so other parts of the system get a triggered update?


On Jan 29, 2013, at 7:22 PM, Chris Grant wrote:

> I don't think that is the best way to go about what you're trying to do.
> Not sure what your exact requirements are, but i'd suggest adding a new
> table (or an extra row to the user table -- not sure how safe that is, I'll
> let someone else comment on that).
> Something like:
> TABLE user_sso
> user_id INT - the user id from the user table
> user_sso INT - your sso ID
>> Anyone know how using a numeric ID will affect the display of the user's
> name on MediaWiki and if it will have any other ramifications?
> The user_name field store's the accounts username. Changing that to a
> numeric ID will give all your accounts numbers for usernames.
>> Can I make sure hte NAME displayed uses user's user_real_name instead if
> user_name ??
> I doubt it. Even if you can, its probably not a good idea.
>> The reason I cannot test this is because I write directly to the DB and
> refresh the history page but it shows the original username (before I
> edited the DB table).
>> [...] Im not sure why my direct DB edits dont chnage the displkay of the
> history page.
> This is because the revision table has an extra rev_user_text field that
> you need to change as well.
> Directly editing the database should be avoided unless you know what you're
> doing.
> I'm not quite sure what you're asking with your last question, however
> MediaWiki should not be altering the user_name field.
> Hope some of this helps.
> -- Chris
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

More information about the MediaWiki-l mailing list