- Affected version
- 2.2.6
The query which gets the list of user ids can just just a
ie something like;
DISTINCT
to avoid fetching more rows than needed, and probably can filter out user_id = 0
in the query itself.ie something like;
PHP:
return $db->fetchAllColumn("
SELECT distinct user_id
FROM xf_report_comment
WHERE report_id = ?
AND comment_date >= ?
AND is_report = 1
AND user_id <> 0
", [$reportId, (int)$lastOpenDate]);