summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node/Root.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-10-04 12:28:41 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-11-02 22:21:46 +0100
commitf737426eca338dbc65db6210a09f3034d372701b (patch)
tree10fbeb022517900955aff8a69e571652ee48d073 /lib/private/Files/Node/Root.php
parentc1feae1684934bb52b1edaa67d33d01b377b875a (diff)
downloadnextcloud-server-f737426eca338dbc65db6210a09f3034d372701b.tar.gz
nextcloud-server-f737426eca338dbc65db6210a09f3034d372701b.zip
Add using casing check/fix for initMountPoints
Diffstat (limited to 'lib/private/Files/Node/Root.php')
-rw-r--r--lib/private/Files/Node/Root.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index 0cda2c8b822..28438e8adbb 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -347,6 +347,15 @@ class Root extends Folder implements IRootFolder {
* @return \OCP\Files\Folder
*/
public function getUserFolder($userId) {
+ $userObject = \OC::$server->getUserManager()->get($userId);
+
+ if (is_null($userObject)) {
+ \OCP\Util::writeLog('files', 'Backends provided no user object for ' . $userId, \OCP\Util::ERROR);
+ throw new \OC\User\NoUserException('Backends provided no user object for ' . $userId);
+ }
+
+ $userId = $userObject->getUID();
+
if (!$this->userFolderCache->hasKey($userId)) {
\OC\Files\Filesystem::initMountPoints($userId);