summaryrefslogtreecommitdiffstats
path: root/lib/private/AllConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AllConfig.php')
-rw-r--r--lib/private/AllConfig.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 4e13d70371b..1f59e677a54 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -68,7 +68,7 @@ class AllConfig implements \OCP\IConfig {
/**
* @param SystemConfig $systemConfig
*/
- function __construct(SystemConfig $systemConfig) {
+ public function __construct(SystemConfig $systemConfig) {
$this->userCache = new CappedMemoryCache();
$this->systemConfig = $systemConfig;
}
@@ -358,12 +358,17 @@ class AllConfig implements \OCP\IConfig {
* ]
*/
private function getUserValues($userId) {
- // TODO - FIXME
- $this->fixDIInit();
-
if (isset($this->userCache[$userId])) {
return $this->userCache[$userId];
}
+ if ($userId === null || $userId === '') {
+ $this->userCache[$userId]=array();
+ return $this->userCache[$userId];
+ }
+
+ // TODO - FIXME
+ $this->fixDIInit();
+
$data = array();
$query = 'SELECT `appid`, `configkey`, `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ?';
$result = $this->connection->executeQuery($query, array($userId));