diff --git a/classes/log/EmailLogDAO.php b/classes/log/EmailLogDAO.php index c8543afbb00..988d56c7e1d 100644 --- a/classes/log/EmailLogDAO.php +++ b/classes/log/EmailLogDAO.php @@ -76,6 +76,9 @@ public function _getByEventType(int $assocType, int $assocId, int $eventType, ?i ->where('u.user_id', $userId) ) ) + ->where('e.assoc_type', '=', (int) $assocType) + ->where('e.assoc_id', '=', (int) $assocId) + ->where('e.event_type', '=', (int) $eventType) ->orderBy('e.log_id') ->select('e.*'); $result = $this->retrieveRange($q, [], $rangeInfo);