This commit is contained in:
FreddleSpl0it 2023-09-12 10:07:46 +02:00
parent b06da30f9d
commit 39eb61e0e9
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5
1 changed files with 4 additions and 2 deletions

View File

@ -155,10 +155,12 @@ while (true) {
logMsg("warning", "No attributes in keycloak found for user " . $user['email']); logMsg("warning", "No attributes in keycloak found for user " . $user['email']);
continue; 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']); logMsg("warning", "No mailcow_template in keycloak found for user " . $user['email']);
continue; continue;
}; }
$mailcow_template = $user['attributes']['mailcow_template']; $mailcow_template = $user['attributes']['mailcow_template'];
// try get mailbox user // try get mailbox user