summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-07 14:40:44 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-02 14:07:54 +0200
commit6f47a547d8a86d1425b00ae0d11a692e772ec4ac (patch)
treee624afb5f58d895a273ae013e5509ad9cadfd297 /lib
parent24131586d74836a0f08f57511f5ec40a3d3ee156 (diff)
downloadnextcloud-server-6f47a547d8a86d1425b00ae0d11a692e772ec4ac.tar.gz
nextcloud-server-6f47a547d8a86d1425b00ae0d11a692e772ec4ac.zip
only use mount provider if we have a valid user
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/filesystem.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 1893996ffc9..2391e84db57 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -436,8 +436,10 @@ class Filesystem {
$mountConfigManager->listen('\OC\Files\Config', 'registerMountProvider', function (IMountProvider $provider) use ($userManager) {
foreach (Filesystem::$usersSetup as $user => $setup) {
$userObject = $userManager->get($user);
- $mounts = $provider->getMountsForUser($userObject, Filesystem::getLoader());
- array_walk($mounts, array(self::$mounts, 'addMount'));
+ if ($userObject) {
+ $mounts = $provider->getMountsForUser($userObject, Filesystem::getLoader());
+ array_walk($mounts, array(self::$mounts, 'addMount'));
+ }
}
});
}