Show real name rather than the nick name in the interface all over the place
This commit is contained in:
@@ -42,6 +42,7 @@ final class PhabricatorPeopleUserPHIDType extends PhabricatorPHIDType {
|
||||
$handle->setName($user->getUsername());
|
||||
$handle->setURI('/p/'.$user->getUsername().'/');
|
||||
$handle->setFullName($user->getFullName());
|
||||
$handle->setRalName($user->getRealName());
|
||||
$handle->setImageURI($user->loadProfileImageURI());
|
||||
$handle->setDisabled(!$user->isUserActivated());
|
||||
if ($user->hasStatus()) {
|
||||
|
@@ -8,6 +8,7 @@ final class PhabricatorObjectHandle
|
||||
private $type;
|
||||
private $name;
|
||||
private $fullName;
|
||||
private $realname;
|
||||
private $title;
|
||||
private $imageURI;
|
||||
private $icon;
|
||||
@@ -142,6 +143,18 @@ final class PhabricatorObjectHandle
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
public function setRalName($real_name) {
|
||||
$this->realname = $real_name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRealName() {
|
||||
if ($this->realname != null) {
|
||||
return $this->realname;
|
||||
}
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
public function setTitle($title) {
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
@@ -296,7 +309,7 @@ final class PhabricatorObjectHandle
|
||||
public function getLinkName() {
|
||||
switch ($this->getType()) {
|
||||
case PhabricatorPeopleUserPHIDType::TYPECONST:
|
||||
$name = $this->getName();
|
||||
$name = $this->getRealName();
|
||||
break;
|
||||
default:
|
||||
$name = $this->getFullName();
|
||||
|
Reference in New Issue
Block a user