diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 37121e5e7..c0732922d 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -224,7 +224,7 @@ class ConfigService { } public function getAttachmentFolder(string $userId = null): string { - if ($this->getUserId() === null) { + if ($userId === null && $this->getUserId() === null) { throw new NoPermissionException('Must be logged in get the attachment folder'); }