From a9f9eaf7a71f77ce15e7dbad9fee2e3f72970528 Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Sat, 26 Jul 2025 21:38:51 +0200 Subject: [PATCH] AppInfo: add config checks before using backends Config checks were removed when moving to IBootstrap: f6bcde7 (Move to IBootstrap initialization and remove the deprecated appinfo/app.php, 2025-04-10) Due to the missing checks, the Nextcloud log is flooded with error messages (SQL errors) if the configuration is incomplete. This is also if either only the user or group backend is used. --- lib/AppInfo/Application.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index c16d2e8..0ba4265 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -63,8 +63,12 @@ class Application extends App implements IBootstrap IGroupManager $groupManager, Backend\GroupBackend $groupBackend, ) { - $userManager->registerBackend($userBackend); - $groupManager->addBackend($groupBackend); + if ($userBackend->isConfigured()) { + $userManager->registerBackend($userBackend); + } + if ($groupBackend->isConfigured()) { + $groupManager->addBackend($groupBackend); + } }); } }