Page MenuHomePhabricator

D16936.diff
No OneTemporary

D16936.diff

diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php
--- a/src/applications/people/storage/PhabricatorUser.php
+++ b/src/applications/people/storage/PhabricatorUser.php
@@ -487,7 +487,7 @@
if ($this->getPHID()) {
$settings = $this->requireCacheData($settings_key);
} else {
- $settings = array();
+ $settings = $this->loadGlobalSettings();
}
// NOTE: To slightly improve performance, we're using all settings here,
@@ -555,6 +555,20 @@
return $this->getUserSetting(PhabricatorTimezoneSetting::SETTINGKEY);
}
+ private function loadGlobalSettings() {
+ $cache_key = 'user.settings.global';
+ $cache = PhabricatorCaches::getRequestCache();
+ $settings = $cache->getKey($cache_key);
+
+ if ($settings === null) {
+ $preferences = PhabricatorUserPreferences::loadGlobalPreferences($this);
+ $settings = $preferences->getPreferences();
+ $cache->setKey($cache_key, $settings);
+ }
+
+ return $settings;
+ }
+
/**
* Override the user's timezone identifier.

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 12:10 PM (14 h, 16 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6745334
Default Alt Text
D16936.diff (1 KB)

Event Timeline