From 6ba2459645567f027ee00b5d0109a61328ba9462 Mon Sep 17 00:00:00 2001 From: Pierre Pelletier Date: Sat, 18 May 2024 11:38:41 +0000 Subject: [PATCH] Fixed blocking last connection fetching --- data/web/inc/header.inc.php | 1 - data/web/js/site/user.js | 2 +- data/web/templates/base.twig | 1 - data/web/templates/user/tab-user-auth.twig | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/data/web/inc/header.inc.php b/data/web/inc/header.inc.php index 9afc288d..5fe25bef 100644 --- a/data/web/inc/header.inc.php +++ b/data/web/inc/header.inc.php @@ -49,7 +49,6 @@ $globalVariables = [ 'app_links' => customize('get', 'app_links'), 'is_root_uri' => (parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) == '/'), 'uri' => $_SERVER['REQUEST_URI'], - 'last_login' => last_login('get', $_SESSION['mailcow_cc_username'], 7, 0)['ui']['time'] ]; foreach ($globalVariables as $globalVariableName => $globalVariableValue) { diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index 088321cd..59d65d8c 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -676,5 +676,5 @@ jQuery(function($){ onVisible("[id^=wl_policy_mailbox_table]", () => draw_wl_policy_mailbox_table()); onVisible("[id^=sync_job_table]", () => draw_sync_job_table()); onVisible("[id^=app_passwd_table]", () => draw_app_passwd_table()); - last_logins('get'); + onVisible("[id^=recent-logins]", () => last_logins('get')); }); diff --git a/data/web/templates/base.twig b/data/web/templates/base.twig index ca744d2a..bd1f5b41 100644 --- a/data/web/templates/base.twig +++ b/data/web/templates/base.twig @@ -146,7 +146,6 @@ var lang_fido2 = {{ lang_fido2|raw }}; var docker_timeout = {{ docker_timeout|raw }} * 1000; var mailcow_cc_role = '{{ mailcow_cc_role }}'; - var last_login = '{{ last_login }}'; var mailcow_info = { version_tag: '{{ mailcow_info.version_tag }}', last_version_tag: '{{ mailcow_info.last_version_tag }}', diff --git a/data/web/templates/user/tab-user-auth.twig b/data/web/templates/user/tab-user-auth.twig index 4d55b709..bc15dfb0 100644 --- a/data/web/templates/user/tab-user-auth.twig +++ b/data/web/templates/user/tab-user-auth.twig @@ -155,7 +155,7 @@
  • 1 {{ lang.user.month }}
  • -
    +
    {{ lang.user.clear_recent_successful_connections }}