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->setName($user->getUsername());
|
||||||
$handle->setURI('/p/'.$user->getUsername().'/');
|
$handle->setURI('/p/'.$user->getUsername().'/');
|
||||||
$handle->setFullName($user->getFullName());
|
$handle->setFullName($user->getFullName());
|
||||||
|
$handle->setRalName($user->getRealName());
|
||||||
$handle->setImageURI($user->loadProfileImageURI());
|
$handle->setImageURI($user->loadProfileImageURI());
|
||||||
$handle->setDisabled(!$user->isUserActivated());
|
$handle->setDisabled(!$user->isUserActivated());
|
||||||
if ($user->hasStatus()) {
|
if ($user->hasStatus()) {
|
||||||
|
@@ -8,6 +8,7 @@ final class PhabricatorObjectHandle
|
|||||||
private $type;
|
private $type;
|
||||||
private $name;
|
private $name;
|
||||||
private $fullName;
|
private $fullName;
|
||||||
|
private $realname;
|
||||||
private $title;
|
private $title;
|
||||||
private $imageURI;
|
private $imageURI;
|
||||||
private $icon;
|
private $icon;
|
||||||
@@ -142,6 +143,18 @@ final class PhabricatorObjectHandle
|
|||||||
return $this->getName();
|
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) {
|
public function setTitle($title) {
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
return $this;
|
return $this;
|
||||||
@@ -296,7 +309,7 @@ final class PhabricatorObjectHandle
|
|||||||
public function getLinkName() {
|
public function getLinkName() {
|
||||||
switch ($this->getType()) {
|
switch ($this->getType()) {
|
||||||
case PhabricatorPeopleUserPHIDType::TYPECONST:
|
case PhabricatorPeopleUserPHIDType::TYPECONST:
|
||||||
$name = $this->getName();
|
$name = $this->getRealName();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$name = $this->getFullName();
|
$name = $this->getFullName();
|
||||||
|
Reference in New Issue
Block a user