2013-04-19 20:40:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorExternalAccount extends PhabricatorUserDAO {
|
|
|
|
|
2013-04-28 22:22:05 +02:00
|
|
|
protected $userPHID;
|
|
|
|
protected $accountType;
|
|
|
|
protected $accountDomain;
|
|
|
|
protected $accountSecret;
|
|
|
|
protected $accountID;
|
|
|
|
protected $displayName;
|
2013-04-19 20:40:13 +02:00
|
|
|
|
2013-04-20 04:50:21 +02:00
|
|
|
public function generatePHID() {
|
2013-04-19 20:40:13 +02:00
|
|
|
return PhabricatorPHID::generateNewPHID(
|
|
|
|
PhabricatorPHIDConstants::PHID_TYPE_XUSR);
|
2013-04-20 04:50:21 +02:00
|
|
|
}
|
2013-04-28 22:22:05 +02:00
|
|
|
|
|
|
|
public function getConfiguration() {
|
|
|
|
return array(
|
|
|
|
self::CONFIG_AUX_PHID => true,
|
|
|
|
) + parent::getConfiguration();
|
|
|
|
}
|
|
|
|
|
2013-05-06 20:34:48 +02:00
|
|
|
public function getPhabricatorUser() {
|
|
|
|
$tmp_usr = id(new PhabricatorUser())
|
|
|
|
->makeEphemeral()
|
|
|
|
->setPHID($this->getPHID());
|
|
|
|
return $tmp_usr;
|
|
|
|
}
|
|
|
|
|
2013-04-19 20:40:13 +02:00
|
|
|
}
|