Commit 284ba5b6 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #12290 from owncloud/ext-preventbreakageduetobugs2

Show warning when invalid user was passed
parents 1c8f9564 c941c3fa
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment