Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorExternalAccount.php
Show All 33 Lines | final class PhabricatorExternalAccount extends PhabricatorUserDAO | ||||
} | } | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'properties' => self::SERIALIZATION_JSON, | 'properties' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'userPHID' => 'phid?', | |||||
'accountType' => 'text16', | |||||
'accountDomain' => 'text64', | |||||
'accountSecret' => 'text?', | |||||
'accountID' => 'text160', | |||||
'displayName' => 'text255?', | |||||
'username' => 'text255?', | |||||
'realName' => 'text255?', | |||||
'email' => 'text255?', | |||||
'emailVerified' => 'bool', | |||||
'profileImagePHID' => 'phid?', | |||||
'accountURI' => 'text255?', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_phid' => null, | |||||
'phid' => array( | |||||
'columns' => array('phid'), | |||||
'unique' => true, | |||||
), | |||||
'account_details' => array( | |||||
'columns' => array('accountType', 'accountDomain', 'accountID'), | |||||
'unique' => true, | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function getPhabricatorUser() { | public function getPhabricatorUser() { | ||||
$tmp_usr = id(new PhabricatorUser()) | $tmp_usr = id(new PhabricatorUser()) | ||||
->makeEphemeral() | ->makeEphemeral() | ||||
->setPHID($this->getPHID()); | ->setPHID($this->getPHID()); | ||||
return $tmp_usr; | return $tmp_usr; | ||||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |