diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index b5296a691..8974010c6 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -204,7 +204,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'); }