diff options
author | Joas Schilling <coding@schilljs.com> | 2018-07-23 16:38:33 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-07-23 16:39:03 +0200 |
commit | 3cac54b955e53ff8d12fcdd31410a3d5d462e0ac (patch) | |
tree | 44c1d5a8bb0272abb45bbc2ae652cd51a041dd01 /apps | |
parent | 6b440cc36558246b9651344872013aa9de21f86e (diff) | |
download | nextcloud-server-3cac54b955e53ff8d12fcdd31410a3d5d462e0ac.tar.gz nextcloud-server-3cac54b955e53ff8d12fcdd31410a3d5d462e0ac.zip |
Don't call getUID on null when the app is loaded for a guest
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/appinfo/app.php | 6 |
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', |