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:
commit
b91e758baa
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue