XF 1.5 How to mass reject all reports by a user?

Alpha1

Well-known member
Some reported 180 posts. How do I mass reject all Open reports by this user?

Is there a query I can use?
 
SQL:
UPDATE xf_report_comment AS rc
INNER JOIN xf_report as r ON
    (r.report_id = rc.report_id)
SET r.report_state = 'rejected'
WHERE rc.is_report = 1
AND r.report_state = 'open'
AND rc.user_id = 12345
I have only briefly tested this. Please backup first.
 
SQL:
UPDATE xf_report_comment AS rc
INNER JOIN xf_report as r ON
    (r.report_id = rc.report_id)
SET r.report_state = 'rejected'
WHERE rc.is_report = 1
AND r.report_state = 'open'
AND rc.user_id = 12345
I have only briefly tested this. Please backup first.
Thanks; it works fine for XF 2.2.
 
Back
Top Bottom