diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-07-23 22:12:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 22:12:39 +0200 |
commit | b91e758baad7dc88747ed8bc3156f10ff73df5be (patch) | |
tree | 5dadbdb75ccc3113c9b561bf4796a54c2c2b79c4 /apps | |
parent | f25d34b293f88cc490c3eca0d2eac4e98a00e3e4 (diff) | |
parent | 3cac54b955e53ff8d12fcdd31410a3d5d462e0ac (diff) | |
download | nextcloud-server-b91e758baad7dc88747ed8bc3156f10ff73df5be.tar.gz nextcloud-server-b91e758baad7dc88747ed8bc3156f10ff73df5be.zip |
Merge pull request #10356 from nextcloud/bugfix/noid/dont-call-getuid-on-null
Don't call getUID on null when the app is loaded for a guest
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', |