diff --git a/data/Dockerfiles/sogo/bootstrap-sogo.sh b/data/Dockerfiles/sogo/bootstrap-sogo.sh index ce5a451e..e7772d1e 100755 --- a/data/Dockerfiles/sogo/bootstrap-sogo.sh +++ b/data/Dockerfiles/sogo/bootstrap-sogo.sh @@ -35,7 +35,7 @@ SELECT mailbox.username, mailbox.domain, mailbox.username, - if(json_extract(attributes, '$.force_pw_update') LIKE '%0%', if(json_extract(attributes, '$.sogo_access') LIKE '%1%', password, '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), + IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.force_pw_update')) = '0', IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.sogo_access')) = 1, password, '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), mailbox.name, mailbox.username, IFNULL(GROUP_CONCAT(ga.aliases ORDER BY ga.aliases SEPARATOR ' '), ''), diff --git a/data/web/inc/functions.transports.inc.php b/data/web/inc/functions.transports.inc.php index a535c184..7d8031aa 100644 --- a/data/web/inc/functions.transports.inc.php +++ b/data/web/inc/functions.transports.inc.php @@ -245,7 +245,7 @@ function transport($_action, $_data = null) { } } } - $destinations = array_values(array_unique($destinations)); + $destinations = array_filter(array_values(array_unique($destinations))); if (empty($destinations)) { return false; } if (isset($next_hop_matches[1])) { if (in_array($next_hop_clean, $existing_nh)) {