Page MenuHomePhabricator

Allow avatars to be global
Closed, ResolvedPublic

Description

For wikifarm setups such as Brickimedia, global avatars are a useful feature to have as it allows for the same easy identification of a user across multiple wikis.

Global avatars were once hacked into Brickimedia's code, as seen on github.

Event Timeline

georgebarnick assigned this task to ashley.
georgebarnick raised the priority of this task from to Medium.
georgebarnick updated the task description. (Show Details)
georgebarnick added a project: SocialProfile.
georgebarnick changed Security from none to None.
georgebarnick added subscribers: georgebarnick, lcawte.

So the avatar handling is done using a memcache key which stores part of the avatar file name. This is done using some crazy magic which uses the database name of the current wiki in the magic to store the filename. (thanks to @ashley for help/explaining finding the code)

Brickimedia's code has simply removed the database name from the magic meaning that all wikis have the same magic filename per user.

One solution would be to change this from using the database name ($wgDBname) to a custom variable that could be then be set globally or on a group of wikis to share avatars. This would default to $wgDBname to allow per-wiki avatars if the community/admins decided this is what they wanted to do. This should make it flexible for all kinds of wikifarms and single installs.

What Lewis said there is exactly what I'm doing (total coincidence though, I never saw that!)

Change 182357 had a related patch set uploaded (by Lewis Cawte):
Allow wikifarms to have global avatars

https://gerrit.wikimedia.org/r/182357

Patch-For-Review

Change 182357 merged by jenkins-bot:
Allow wikifarms to have global avatars

https://gerrit.wikimedia.org/r/182357

ashley added a subscriber: UltrasonicNXT.

Thanks @lcawte and @UltrasonicNXT for the patch!