diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 0f6d996e9..0f4f5d5f7 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -193,7 +193,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'); }