diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-10-04 12:28:41 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-11-02 22:21:46 +0100 |
commit | f737426eca338dbc65db6210a09f3034d372701b (patch) | |
tree | 10fbeb022517900955aff8a69e571652ee48d073 /lib/private/Share/Share.php | |
parent | c1feae1684934bb52b1edaa67d33d01b377b875a (diff) | |
download | nextcloud-server-f737426eca338dbc65db6210a09f3034d372701b.tar.gz nextcloud-server-f737426eca338dbc65db6210a09f3034d372701b.zip |
Add using casing check/fix for initMountPoints
Diffstat (limited to 'lib/private/Share/Share.php')
-rw-r--r-- | lib/private/Share/Share.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 33801cd6347..842dded0671 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -136,6 +136,15 @@ class Share extends Constants { * not '/admin/data/file.txt' */ public static function getUsersSharingFile($path, $ownerUser, $includeOwner = false, $returnUserPaths = false, $recursive = true) { + $userManager = \OC::$server->getUserManager(); + $userObject = $userManager->get($ownerUser); + + if (is_null($ownerUser)) { + \OCP\Util::writeLog('files', ' Backends provided no user object for ' . $ownerUser, \OCP\Util::ERROR); + throw new \OC\User\NoUserException('Backends provided no user object for ' . $ownerUser); + } + + $ownerUser = $userObject->getUID(); Filesystem::initMountPoints($ownerUser); $shares = $sharePaths = $fileTargets = array(); |