1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-23 02:04:46 +02:00

Merge pull request #5724 from q16marvin/master

show last sso login in mailbox table
This commit is contained in:
FreddleSpl0it 2024-09-05 12:02:16 +02:00 committed by GitHub
commit b1368d29d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -4546,6 +4546,9 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
}
else if ($SaslLogs['service'] == 'pop3') {
$last_pop3_login = strtotime($SaslLogs['datetime']);
}
else if ($SaslLogs['service'] == 'SSO') {
$last_sso_login = strtotime($SaslLogs['datetime']);
}
}
if (!isset($last_imap_login) || $GLOBALS['SHOW_LAST_LOGIN'] === false) {
@ -4556,10 +4559,14 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
}
if (!isset($last_pop3_login) || $GLOBALS['SHOW_LAST_LOGIN'] === false) {
$last_pop3_login = 0;
}
if (!isset($last_sso_login) || $GLOBALS['SHOW_LAST_LOGIN'] === false) {
$last_sso_login = 0;
}
$mailboxdata['last_imap_login'] = $last_imap_login;
$mailboxdata['last_smtp_login'] = $last_smtp_login;
$mailboxdata['last_pop3_login'] = $last_pop3_login;
$mailboxdata['last_sso_login'] = $last_sso_login;
if (!isset($_extra) || $_extra != 'reduced') {
$rl = ratelimit('get', 'mailbox', $_data);

View File

@ -894,7 +894,7 @@ jQuery(function($){
item.quota.value = humanFileSize(item.quota_used) + "/" + item.quota.value;
item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox);
item.last_mail_login = item.last_imap_login + '/' + item.last_pop3_login + '/' + item.last_smtp_login;
item.last_mail_login = item.last_imap_login + '/' + item.last_pop3_login + '/' + item.last_smtp_login + '/' + item.last_sso_login;
/*
if (!item.rl) {
item.rl = '∞';
@ -1015,7 +1015,8 @@ jQuery(function($){
res = data.split("/");
return '<div class="badge bg-info mb-2">IMAP @ ' + unix_time_format(Number(res[0])) + '</div><br>' +
'<div class="badge bg-info mb-2">POP3 @ ' + unix_time_format(Number(res[1])) + '</div><br>' +
'<div class="badge bg-info">SMTP @ ' + unix_time_format(Number(res[2])) + '</div>';
'<div class="badge bg-info">SMTP @ ' + unix_time_format(Number(res[2])) + '</div><br>' +
'<div class="badge bg-info">SSO @ ' + unix_time_format(Number(res[3])) + '</div>';
}
},
{