Skip to content

Commit

Permalink
Merge pull request #5880 from PierrePlt:fix/blocking-last-logins
Browse files Browse the repository at this point in the history
Fix blocking last logins fetching
  • Loading branch information
DerLinkman committed Jun 10, 2024
2 parents 4a052da + 6ba2459 commit 9776849
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion data/web/inc/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
'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) {
Expand Down
2 changes: 1 addition & 1 deletion data/web/js/site/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
});
1 change: 0 additions & 1 deletion data/web/templates/base.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}',
Expand Down
2 changes: 1 addition & 1 deletion data/web/templates/user/tab-user-auth.twig
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<li class="login-history" data-days="31"><a class="dropdown-item" href="#">1 {{ lang.user.month }}</a></li>
</ul>
</div>
<div class="last-login mt-4"></div>
<div class="last-login mt-4" id="recent-logins"></div>
<span class="clear-last-logins mt-2">
{{ lang.user.clear_recent_successful_connections }}
</span>
Expand Down

0 comments on commit 9776849

Please sign in to comment.