diff options
Diffstat (limited to 'apps/dav/lib/Files/RootCollection.php')
-rw-r--r-- | apps/dav/lib/Files/RootCollection.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/Files/RootCollection.php b/apps/dav/lib/Files/RootCollection.php index 57802d19573..345015530e2 100644 --- a/apps/dav/lib/Files/RootCollection.php +++ b/apps/dav/lib/Files/RootCollection.php @@ -40,7 +40,7 @@ class RootCollection extends AbstractPrincipalCollection { function getChildForPrincipal(array $principalInfo) { list(,$name) = URLUtil::splitPath($principalInfo['uri']); $user = \OC::$server->getUserSession()->getUser(); - if ($name !== $user->getUID()) { + if (is_null($user) || $name !== $user->getUID()) { // a user is only allowed to see their own home contents, so in case another collection // is accessed, we return a simple empty collection for now // in the future this could be considered to be used for accessing shared files |