Differential D20908 Diff 49852 src/applications/repository/storage/PhabricatorRepositoryIdentity.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryIdentity.php
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | if ($this->hasEffectiveUser()) { | ||||
return $this->getCurrentEffectiveUserPHID(); | return $this->getCurrentEffectiveUserPHID(); | ||||
} else { | } else { | ||||
return $this->getPHID(); | return $this->getPHID(); | ||||
} | } | ||||
} | } | ||||
public function save() { | public function save() { | ||||
if ($this->manuallySetUserPHID) { | if ($this->manuallySetUserPHID) { | ||||
$this->currentEffectiveUserPHID = $this->manuallySetUserPHID; | $unassigned = DiffusionIdentityUnassignedDatasource::FUNCTION_TOKEN; | ||||
if ($this->manuallySetUserPHID === $unassigned) { | |||||
$effective_phid = null; | |||||
} else { | } else { | ||||
$this->currentEffectiveUserPHID = $this->automaticGuessedUserPHID; | $effective_phid = $this->manuallySetUserPHID; | ||||
} | } | ||||
} else { | |||||
$effective_phid = $this->automaticGuessedUserPHID; | |||||
} | |||||
$this->setCurrentEffectiveUserPHID($effective_phid); | |||||
$email_address = $this->getIdentityEmailAddress(); | $email_address = $this->getIdentityEmailAddress(); | ||||
// Raw identities are unrestricted binary data, and may consequently | // Raw identities are unrestricted binary data, and may consequently | ||||
// have arbitrarily long, binary email address information. We can't | // have arbitrarily long, binary email address information. We can't | ||||
// store this kind of information in the "emailAddress" column, which | // store this kind of information in the "emailAddress" column, which | ||||
// has column type "sort255". | // has column type "sort255". | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |