• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug Skip session report counts if reports are sent to forum (save a query)


Well-known member
You can save an unneeded query or two when reports are sent to a report forum rather than using the built-in report system. Specifically,

XenForo_ControllerPublic_Abstract->_updateModeratorSessionReportCounts() should check if XenForo_Application::getOptions()->reportIntoForumId is set, and if it is, avoid calling rebuildReportCountCache() and/or getActiveReportsCountsForUser().

Edit: Or alternatively one could do the necessary check within the Report model.
Last edited:


Well-known member
Nevermind, just discovered that the reportCounts cache wouldn't get updated anymore once you switch to the forum system, meaning it won't get stale and no further queries will be made.