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

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

No files matched your search

+1 -1
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));