[SOGo, Dovecot] Remove unnecessary likes from sql queries

[Web] Filter transport destinations to prevent empty destinations
This commit is contained in:
andryyy
2020-09-20 22:21:00 +02:00
parent 4627331339
commit 3a9efc86cf
2 changed files with 2 additions and 2 deletions

View File

@@ -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 ' '), ''),