}
$appConfig = \OC::$server->getAppConfig();
$appStatus = $appConfig->getValues(false, 'enabled');
+ $user = \OC_User::getUser();
foreach ($appStatus as $app => $enabled) {
if ($app === 'files') {
continue;
if ($enabled === 'yes') {
$apps[] = $app;
} else if ($enabled !== 'no') {
- $user = \OC_User::getUser();
$groups = json_decode($enabled);
if (is_array($groups)) {
foreach ($groups as $group) {
}
sort($apps);
array_unshift($apps, 'files');
- self::$enabledAppsCache = $apps;
+ if ($user) {
+ self::$enabledAppsCache = $apps;
+ }
return $apps;
}