aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Config/UserConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Config/UserConfig.php')
-rw-r--r--lib/private/Config/UserConfig.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php
index 77a86a5e1c7..22588d5394d 100644
--- a/lib/private/Config/UserConfig.php
+++ b/lib/private/Config/UserConfig.php
@@ -1865,6 +1865,19 @@ class UserConfig implements IUserConfig {
$this->logger->notice('User config key ' . $app . '/' . $key . ' is set as deprecated.');
}
+ // There should be no downside to load all config values if search for
+ // a lazy config value while fast value are still not loaded.
+ if ($lazy && !($this->fastLoaded[$userId] ?? false)) {
+ $this->loadConfigAll($userId);
+ }
+
+ // while the Lexicon indicate that the config value is expected Lazy, we could
+ // have a previous entry still in fast cache. Updating Laziness for all users.
+ if ($lazy && isset($this->fastCache[$userId][$app][$key])) {
+ $this->updateGlobalLazy($app, $key, true);
+ }
+
+ // TODO: remove this feature before 32 if https://github.com/nextcloud/server/issues/51804 is implemented
$enforcedValue = $this->config->getSystemValue('lexicon.default.userconfig.enforced', [])[$app][$key] ?? false;
if (!$enforcedValue && $this->hasKey($userId, $app, $key, $lazy)) {
// if key exists there should be no need to extract default