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
This commit is contained in:
Morris Jobke 2018-07-23 22:12:39 +02:00 committed by GitHub
commit b91e758baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',