From 8d66a4aec413264ed0fb8b461dd632fc067266a6 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Mon, 24 Jul 2023 14:59:05 +0200 Subject: [PATCH] readd missing email quota information on customers dashboard, fixes #1159 Signed-off-by: Michael Kaufmann --- customer_index.php | 5 +++++ templates/Froxlor/user/index.html.twig | 3 +++ 2 files changed, 8 insertions(+) diff --git a/customer_index.php b/customer_index.php index 17b48486..00fbf3f7 100644 --- a/customer_index.php +++ b/customer_index.php @@ -113,6 +113,11 @@ if ($page == 'overview') { $userinfo['traffic_bytes'] = ($userinfo['traffic'] > -1) ? $userinfo['traffic'] * 1024 : -1; $userinfo['traffic_bytes_used'] = $userinfo['traffic_used'] * 1024; + if (Settings::Get('system.mail_quota_enabled')) { + $userinfo['email_quota_bytes'] = ($userinfo['email_quota'] > -1) ? $userinfo['email_quota'] * 1024 : -1; + $userinfo['email_quota_bytes_used'] = $userinfo['email_quota_used'] * 1024; + } + if ($usages) { $userinfo['diskspace_bytes_used'] = $usages['webspace'] * 1024; $userinfo['mailspace_used'] = $usages['mail'] * 1024; diff --git a/templates/Froxlor/user/index.html.twig b/templates/Froxlor/user/index.html.twig index 0933c4b8..8c3ef479 100644 --- a/templates/Froxlor/user/index.html.twig +++ b/templates/Froxlor/user/index.html.twig @@ -41,6 +41,9 @@ {{ dashboard.ditem('customer.emails', userinfo.emails, userinfo.emails_used) }} {{ dashboard.ditem('customer.accounts', userinfo.email_accounts, userinfo.email_accounts_used, null, false, userinfo.mailspace_used) }} {{ dashboard.ditem('customer.forwarders', userinfo.email_forwarders, userinfo.email_forwarders_used) }} + {% if get_setting('system.mail_quota_enabled') and userinfo.email_quota != '0' %} + {{ dashboard.ditem('customer.email_quota', userinfo.email_quota_bytes, userinfo.email_quota_bytes_used, null, true) }} + {% endif %} {{ dashboard.ditem('customer.ftps', userinfo.ftps, userinfo.ftps_used) }} {% endif %}