diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-19 14:27:32 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-19 14:27:32 +0100 |
commit | 284ba5b688d7f0a9d2e1f7b9a68a7e8362be5e67 (patch) | |
tree | 00566e95063a3600ca1918ad1d2a17182db32e99 | |
parent | 1c8f9564a470095134f0134f5d59fc0eece66f0e (diff) | |
parent | c941c3fa5139ba4f122d4f40d9c9db5e50f8bcb7 (diff) | |
download | nextcloud-server-284ba5b688d7f0a9d2e1f7b9a68a7e8362be5e67.tar.gz nextcloud-server-284ba5b688d7f0a9d2e1f7b9a68a7e8362be5e67.zip |
Merge pull request #12290 from owncloud/ext-preventbreakageduetobugs2
Show warning when invalid user was passed
-rw-r--r-- | apps/files_external/lib/config.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index fa44e446d96..9400bbdedc0 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -121,6 +121,14 @@ class OC_Mount_Config { if ($data['user']) { $user = \OC::$server->getUserManager()->get($data['user']); + if (!$user) { + \OC_Log::write( + 'files_external', + 'Cannot init external mount points for non-existant user "' . $data['user'] . '".', + \OC_Log::WARN + ); + return; + } $userView = new \OC\Files\View('/' . $user->getUID() . '/files'); $changePropagator = new \OC\Files\Cache\ChangePropagator($userView); $etagPropagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, \OC::$server->getConfig()); |