Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
| Show First 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | public function overrideTimezoneIdentifier($identifier) { | ||||
| $this->settingCache[$timezone_key] = $identifier; | $this->settingCache[$timezone_key] = $identifier; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getSex() { | public function getSex() { | ||||
| return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY); | return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY); | ||||
| } | } | ||||
| public function loadPreferences() { | |||||
| if ($this->preferences) { | |||||
| return $this->preferences; | |||||
| } | |||||
| $preferences = null; | |||||
| if ($this->getPHID()) { | |||||
| $preferences = id(new PhabricatorUserPreferencesQuery()) | |||||
| ->setViewer($this) | |||||
| ->withUsers(array($this)) | |||||
| ->executeOne(); | |||||
| } | |||||
| if (!$preferences) { | |||||
| $preferences = new PhabricatorUserPreferences(); | |||||
| $preferences->setUserPHID($this->getPHID()); | |||||
| $preferences->attachUser($this); | |||||
| } | |||||
| $this->preferences = $preferences; | |||||
| return $preferences; | |||||
| } | |||||
| public function loadEditorLink( | public function loadEditorLink( | ||||
| $path, | $path, | ||||
| $line, | $line, | ||||
| PhabricatorRepository $repository = null) { | PhabricatorRepository $repository = null) { | ||||
| $editor = $this->getUserSetting(PhabricatorEditorSetting::SETTINGKEY); | $editor = $this->getUserSetting(PhabricatorEditorSetting::SETTINGKEY); | ||||
| if (is_array($path)) { | if (is_array($path)) { | ||||
| ▲ Show 20 Lines • Show All 964 Lines • Show Last 20 Lines | |||||