Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | public function saveWithoutIndex() { | ||||
return parent::save(); | return parent::save(); | ||||
} | } | ||||
public function save() { | public function save() { | ||||
if (!$this->getConduitCertificate()) { | if (!$this->getConduitCertificate()) { | ||||
$this->setConduitCertificate($this->generateConduitCertificate()); | $this->setConduitCertificate($this->generateConduitCertificate()); | ||||
} | } | ||||
if (!strlen($this->getAccountSecret())) { | $secret = $this->getAccountSecret(); | ||||
if (($secret === null) || !strlen($secret)) { | |||||
$this->setAccountSecret(Filesystem::readRandomCharacters(64)); | $this->setAccountSecret(Filesystem::readRandomCharacters(64)); | ||||
} | } | ||||
$result = $this->saveWithoutIndex(); | $result = $this->saveWithoutIndex(); | ||||
if ($this->profile) { | if ($this->profile) { | ||||
$this->profile->save(); | $this->profile->save(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,176 Lines • Show Last 20 Lines |