diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AvatarManager.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/AvatarManager.php b/lib/private/AvatarManager.php index 6f1f380a903..df3247b8f00 100644 --- a/lib/private/AvatarManager.php +++ b/lib/private/AvatarManager.php @@ -91,14 +91,20 @@ class AvatarManager implements IAvatarManager { if (is_null($user)) { 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); |