In a server I'm setting up, any given user will need to have a site-specific identity. All of us are familiar with the concept: At home I'm Tony. In business I'm Anthony. In one game I could be TheGreatOne, and in another game I could be "TotalNewb". I was taking a class where a woman named Toni was sitting right next to me so I asked the teacher to call me TJ. People identify us differently based on context and preferences.
So, does anyone know a good plugin that will allow a user to change their visible user display name for each site, while of course maintaining a single network-wide username and email ID?
I was surprised a while back when I was looking for this (in BuddyPress) that there wasn't a hook for returning the display name, but maybe I missed something. I might be able to code this myself with shortcuts to replace hard-coded displayname queries. But with every plugin and every software update I'll need to hunt and make this change. :slight_frown:
I was also thinking that if I forced the display name for every user to internally be set to something like !!UNAME!!99999!! (where 99999 is the user's ID#), then I could set a sitewide filter that looks for instances of !!UNAME!!, and where it's found remove that and the trailing ID, parse the ID, concatenate it with the site name, and then do a lookup for the site-specific display name. So siteID_userID would be used as a key to a custom table. And that table would be updated from each user's profile.
I don't know if text filters like that are not applied to specific pages or in specific contexts. If so then I'd either need to hook multiple filters or, once again, to hack code where this doesn't happen. But for translation purposes I have to believe that everything gets put through a filter somewhere, no?
I'm open to better approaches to any of this. Thanks!!