Show real name rather than the nick name in the interface all over the place

This commit is contained in:
2014-09-30 18:06:15 +06:00
parent fd882b5167
commit e74f0e1558
2 changed files with 15 additions and 1 deletions

View File

@@ -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()) {

View File

@@ -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();