From 39eb61e0e98abd52739fec535b4eb15fb484ea7b Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Tue, 12 Sep 2023 10:07:46 +0200 Subject: [PATCH] Fixes #5408 --- data/conf/phpfpm/crons/keycloak-sync.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/conf/phpfpm/crons/keycloak-sync.php b/data/conf/phpfpm/crons/keycloak-sync.php index baeec21d..da26ca5b 100644 --- a/data/conf/phpfpm/crons/keycloak-sync.php +++ b/data/conf/phpfpm/crons/keycloak-sync.php @@ -155,10 +155,12 @@ while (true) { logMsg("warning", "No attributes in keycloak found for user " . $user['email']); continue; } - if (count($user['attributes']['mailcow_template']) == 0) { + if (!isset($user['attributes']['mailcow_template']) || + !is_array($user['attributes']['mailcow_template']) || + count($user['attributes']['mailcow_template']) == 0) { logMsg("warning", "No mailcow_template in keycloak found for user " . $user['email']); continue; - }; + } $mailcow_template = $user['attributes']['mailcow_template']; // try get mailbox user