aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Util.php')
-rw-r--r--lib/public/Util.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 86f84565218..687f4e78f69 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -181,7 +181,12 @@ class Util {
self::$shareManager = \OC::$server->getShareManager();
}
- return self::$shareManager->sharingDisabledForUser(\OC::$server->getUserSession()->getUser()->getUID());
+ $user = \OC::$server->getUserSession()->getUser();
+ if ($user !== null) {
+ $user = $user->getUID();
+ }
+
+ return self::$shareManager->sharingDisabledForUser($user);
}
/**