summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/appinfo/app.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 567b1a16bac..13705718a04 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -96,7 +96,11 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
]);
// show_Quick_Access stored as string
- $defaultExpandedState = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_sharing_menu', '0') === '1';
+ $user = $userSession->getUser();
+ $defaultExpandedState = true;
+ if ($user instanceof \OCP\IUser) {
+ $defaultExpandedState = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_sharing_menu', '0') === '1';
+ }
\OCA\Files\App::getNavigationManager()->add([
'id' => 'shareoverview',