[Web] Log only latest datetime of a unique datetime, service and ip combination

This commit is contained in:
andryyy
2021-07-01 06:44:37 +02:00
parent 9b8f5b7cc1
commit 78084c5e7b
5 changed files with 13 additions and 27 deletions

View File

@@ -3547,7 +3547,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
}
// Determine last logins
$stmt = $pdo->prepare("SELECT MAX(`datetime`) AS `datetime`, `service` FROM `sasl_logs`
$stmt = $pdo->prepare("SELECT MAX(`datetime`) AS `datetime`, `service` FROM `sasl_log`
WHERE `username` = :mailbox
GROUP BY `service` DESC");
$stmt->execute(array(':mailbox' => $_data));