do not show manual IMAP account section when mail handling is turned off for some domains
Bernd Wurst

Bernd Wurst commited on 2020-08-10 17:42:19
Zeige 1 geänderte Dateien mit 1 Einfügungen und 1 Löschungen.

... ...
@@ -39,7 +39,7 @@ if (! function_exists("user_has_dotcourier_domain")) {
39 39
         }
40 40
         $uid = (int) $_SESSION['userinfo']['uid'];
41 41
         $result = db_query("select 1 from mail.custom_mappings as c left join mail.v_domains as d on (d.id=c.domain) where d.user=:uid or c.uid=:uid UNION ".
42
-            "SELECT 1 FROM mail.v_domains AS d WHERE d.user=:uid AND d.id != ALL(SELECT domain FROM mail.virtual_mail_domains)", array(":uid" => $uid));
42
+            "SELECT 1 FROM mail.v_domains AS d WHERE d.user=:uid AND d.mail != 'none' AND d.id != ALL(SELECT domain FROM mail.virtual_mail_domains)", array(":uid" => $uid));
43 43
         $ret = ($result->rowCount() > 0);
44 44
         if ($ret) {
45 45
             DEBUG("User {$uid} has dotcourier-domains");
46 46