Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
| Show First 20 Lines • Show All 500 Lines • ▼ Show 20 Lines | public function getUserSetting($key) { | ||||
| $defaults = PhabricatorSetting::getAllEnabledSettings($this); | $defaults = PhabricatorSetting::getAllEnabledSettings($this); | ||||
| if (isset($defaults[$key])) { | if (isset($defaults[$key])) { | ||||
| return $defaults[$key]->getSettingDefaultValue(); | return $defaults[$key]->getSettingDefaultValue(); | ||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| public function compareUserSetting($key, $value) { | |||||
| $actual = $this->getUserSetting($key); | |||||
| return ($actual == $value); | |||||
| } | |||||
| public function loadPreferences() { | public function loadPreferences() { | ||||
| if ($this->preferences) { | if ($this->preferences) { | ||||
| return $this->preferences; | return $this->preferences; | ||||
| } | } | ||||
| $preferences = null; | $preferences = null; | ||||
| if ($this->getPHID()) { | if ($this->getPHID()) { | ||||
| $preferences = id(new PhabricatorUserPreferencesQuery()) | $preferences = id(new PhabricatorUserPreferencesQuery()) | ||||
| ▲ Show 20 Lines • Show All 1,021 Lines • Show Last 20 Lines | |||||