diff options
Diffstat (limited to 'lib/private/AvatarManager.php')
-rw-r--r-- | lib/private/AvatarManager.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/AvatarManager.php b/lib/private/AvatarManager.php index 0eabc3a1754..df3247b8f00 100644 --- a/lib/private/AvatarManager.php +++ b/lib/private/AvatarManager.php @@ -92,11 +92,19 @@ class AvatarManager implements IAvatarManager { throw new \Exception('user does not exist'); } + // sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below) + $userId = $user->getUID(); + /* * Fix for #22119 - * Basically we do not want to copy the skeleton folder + * Basically we do not want to copy the skeleton folder. + * + * For unit test purposes this is ignored when run in PHPUnit. */ - \OC\Files\Filesystem::initMountPoints($userId); + if(!defined('PHPUNIT_RUN')) { + \OC\Files\Filesystem::initMountPoints($userId); + } + $dir = '/' . $userId; /** @var Folder $folder */ $folder = $this->rootFolder->get($dir); |