Skip to content

Commit

Permalink
Merge pull request #12290 from owncloud/ext-preventbreakageduetobugs2
Browse files Browse the repository at this point in the history
Show warning when invalid user was passed
  • Loading branch information
LukasReschke committed Nov 19, 2014
2 parents 1c8f956 + c941c3f commit 284ba5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/files_external/lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ public static function initMountPointsHook($data) {

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());
Expand Down

0 comments on commit 284ba5b

Please sign in to comment.