Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
| Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | final class PhabricatorUser | ||||
| public function getMonogram() { | public function getMonogram() { | ||||
| return '@'.$this->getUsername(); | return '@'.$this->getUsername(); | ||||
| } | } | ||||
| public function isLoggedIn() { | public function isLoggedIn() { | ||||
| return !($this->getPHID() === null); | return !($this->getPHID() === null); | ||||
| } | } | ||||
| public function saveWithoutIndex() { | |||||
| 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())) { | if (!strlen($this->getAccountSecret())) { | ||||
| $this->setAccountSecret(Filesystem::readRandomCharacters(64)); | $this->setAccountSecret(Filesystem::readRandomCharacters(64)); | ||||
| } | } | ||||
| $result = parent::save(); | $result = $this->saveWithoutIndex(); | ||||
| if ($this->profile) { | if ($this->profile) { | ||||
| $this->profile->save(); | $this->profile->save(); | ||||
| } | } | ||||
| $this->updateNameTokens(); | $this->updateNameTokens(); | ||||
| PhabricatorSearchWorker::queueDocumentForIndexing($this->getPHID()); | PhabricatorSearchWorker::queueDocumentForIndexing($this->getPHID()); | ||||
| ▲ Show 20 Lines • Show All 1,370 Lines • Show Last 20 Lines | |||||