/** * Adds file mounts from the user's file mount records * * @param ResourceStorage $storage * @return void */ protected function addFileMountsToStorage(ResourceStorage $storage) { foreach ($this->backendUserAuthentication->getFileMountRecords() as $fileMountRow) { if ((int) $fileMountRow['base'] === (int) $storage->getUid()) { try { $storage->addFileMount($fileMountRow['path'], $fileMountRow); } catch (FolderDoesNotExistException $e) { // That file mount does not seem to be valid, fail silently } } } }