From 85e7305d8d6e43b4777a68c393b3913a30e4abea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 27 Feb 2023 22:56:28 +0100 Subject: [PATCH] fix: Use passed userid when getting attachment folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/ConfigService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); }