Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / storage / PhabricatorUserProfile.php
blobda447410f5f487d58381f755dcce969b8eb8eaee
1 <?php
3 final class PhabricatorUserProfile extends PhabricatorUserDAO {
5 protected $userPHID;
6 protected $title;
7 protected $blurb;
8 protected $profileImagePHID;
9 protected $icon;
11 public static function initializeNewProfile(PhabricatorUser $user) {
12 $default_icon = PhabricatorPeopleIconSet::getDefaultIconKey();
14 return id(new self())
15 ->setUserPHID($user->getPHID())
16 ->setIcon($default_icon)
17 ->setTitle('')
18 ->setBlurb('');
21 protected function getConfiguration() {
22 return array(
23 self::CONFIG_COLUMN_SCHEMA => array(
24 'title' => 'text255',
25 'blurb' => 'text',
26 'profileImagePHID' => 'phid?',
27 'icon' => 'text32',
29 self::CONFIG_KEY_SCHEMA => array(
30 'userPHID' => array(
31 'columns' => array('userPHID'),
32 'unique' => true,
35 ) + parent::getConfiguration();
38 public function getDisplayTitle() {
39 $title = $this->getTitle();
40 if (strlen($title)) {
41 return $title;
44 $icon_key = $this->getIcon();
45 return PhabricatorPeopleIconSet::getIconName($icon_key);