Page MenuHomePhabricator

Options to display Real Name instead of username everywhere
Closed, DuplicatePublic

Description

root problem: usernames do not effectively communicate who a user is in my corporate environment, their real name does.

For those of us using LDAP (specifically Active Directory) registration in a corporate environment, our usernames are things like txf045 for a user like Tiffany Flanders. We already import the users Real Name through the LDAP integration, but seeing their username everywhere is confusing.

It would be great if there was an option we could enable to display their real name everywhere their username would usually be displayed.

Thank you for your consideration.

Event Timeline

I'm not sure this is a problem of Phabricator. It sounds like a problem of your LDAP conventions.

@ofbeaton For more context and arguments to give if you wish to review your LDAP conventions, see T3167#32426.

Thanks, I thought I had searched before filing, but apparently not with the right terms. Thanks for the information. I wish I could change the LDAP conventions, but I control Phabricator, not Corporate IT LDAP in other departments.

If you're willing to maintain a fork / patch, this is probably just a few extra lines of code to get most of them.

diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php
index 2b626f2..ad2ff9e 100644
--- a/src/applications/phid/PhabricatorObjectHandle.php
+++ b/src/applications/phid/PhabricatorObjectHandle.php
@@ -340,7 +340,7 @@ final class PhabricatorObjectHandle
   public function getLinkName() {
     switch ($this->getType()) {
       case PhabricatorPeopleUserPHIDType::TYPECONST:
-        $name = $this->getName();
+        $name = $this->getFullName();
         break;
       default:
         $name = $this->getFullName();

@ofbeaton ^^ That single line should convert 90% of the name links, if you need.

Thanks @chad, that worked great. I added applying the patch to our deployment script for phabricator. Much appreciated.

@ofbeaton Just curious what's your strategy on applying patches as part of your deployment for phabricator? Do you use a find/replace strategy? Apply diffs?

@jessjohnson We use puppet to deploy phabricator stable from a copy on a local file server, then have it run a shell script that applies our patches using git apply on .patch files. Lastly we restart services.

Where appropriate/possible we drop in modules/extensions instead of changing the core code itself. Thankfully we haven't had to rebuild our current set of patches in a fairly long time.

Would much rather see upstream take on more options -- but they aren't, even when it's bugs (only a little salty), so what you gonna do? Have to fork :(

@ofbeaton Thanks for the tips. Sounds better than the approach we are using to slightly modify the code base.

Feel free to use our Discourse for general admin questions (as opposed to our working tasks). Thank you!

For those visiting from the future via search, I have decided to publish the unofficial patch in a github repo, as it breaks once in awhile due to upstream changes.

https://github.com/ofbeaton/phabricator-fullname

Support requests in how to use it should be directed at the github issues page.