From ddf6f275dbce526fb72740a16b931f76e95b717c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 3 Jun 2015 15:13:29 +0500 Subject: [PATCH] Show login in the user monogram This is actually appeared handy after discussion with campbell. --- .../people/markup/PhabricatorMentionRemarkupRule.php | 4 ++-- src/applications/people/storage/PhabricatorUser.php | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php index afaad83c2a..22ddda23b1 100644 --- a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php +++ b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php @@ -134,12 +134,12 @@ final class PhabricatorMentionRemarkupRule extends PhutilRemarkupRule { font-weight: bold; padding: 0 4px;', ), - '@'.($user->getRealName() ? $user->getRealName() : $user->getUsername())); + '@'.$user->getFullName()); } else { $tag = id(new PHUITagView()) ->setType(PHUITagView::TYPE_PERSON) ->setPHID($user->getPHID()) - ->setName('@'. ($user->getRealName() ? $user->getRealName() : $user->getUsername())) + ->setName('@'.$user->getFullName()) ->setHref($user_href); if ($user_has_no_permission) { diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index d650c472d6..8538e57581 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -274,10 +274,7 @@ final class PhabricatorUser } public function getMonogram() { - if ($this->getRealName()) - return '@'.$this->getRealName(); - else - return '@'.$this->getUsername(); + return '@'.$this->getFullname(); } public function isLoggedIn() {