Skip to content
Snippets Groups Projects
Commit b069f33a authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

throw exception when backends don't provide a user instead of creating legacy local storages

parent 5626a02d
Branches
No related tags found
No related merge requests found
...@@ -373,7 +373,11 @@ class Filesystem { ...@@ -373,7 +373,11 @@ class Filesystem {
$userObject = \OC_User::getManager()->get($user); $userObject = \OC_User::getManager()->get($user);
if (!is_null($userObject)) { if (is_null($userObject)) {
\OCP\Util::writeLog('files', ' Backends provided no user object for '.$user, \OCP\Util::ERROR);
throw new \OC\User\NoUserException();
}
$homeStorage = \OC_Config::getValue( 'objectstore' ); $homeStorage = \OC_Config::getValue( 'objectstore' );
if (!empty($homeStorage)) { if (!empty($homeStorage)) {
// sanity checks // sanity checks
...@@ -404,10 +408,6 @@ class Filesystem { ...@@ -404,10 +408,6 @@ class Filesystem {
self::mount($homeStorage['class'], $homeStorage['arguments'], $user); self::mount($homeStorage['class'], $homeStorage['arguments'], $user);
$home = \OC\Files\Filesystem::getStorage($user); $home = \OC\Files\Filesystem::getStorage($user);
}
else {
self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
}
self::mountCacheDir($user); self::mountCacheDir($user);
......
<?php
/**
* ownCloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING-AGPL file.
*
* @author Jörn Friedrich Dreyer <jfd@owncloud.com>
* @copyright Jörn Friedrich Dreyer 2015
*/
namespace OC\User;
class NoUserException extends \Exception {}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment