Don't call getUID on null when the app is loaded for a guest
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6b440cc365
commit
3cac54b955
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue