diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-05-03 15:05:51 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-06-14 12:34:41 +0300 |
commit | 28d070730d9de5aec690f152a95dbf1da123d2ee (patch) | |
tree | c8ae03e57a90f2f0f2ddae7b6d872a4ea98e53ac /lib/public/Util.php | |
parent | ae3d0d96fe7e273f6dfae3a5ca4754b5da4353cc (diff) |
Fix case with no user
Diffstat (limited to 'lib/public/Util.php')
-rw-r--r-- | lib/public/Util.php | 7 |
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); } /** |