XF 1.1 Warnings script to re-ban users?

realwx

Member
We just ran a vBulletin infraction importer I built, however I can't find anywhere that goes through and actively "refreshes" the warning cache to ban people already banned in regards to what's defined in warning actions (e.g. 6 points: in a usergroup, 100 points: banned entirely). Any way to do this?
 
There is no such utility in the software. Warning actions are only applied at the time of the warning.

You will need a custom script to run this function on all users:

XenForo_Model_Warning::userWarningPointsChanged

Basically foreach through every userid and call this function. In the case of newly imported users the $oldPoints would always be 0.

This function is normally called by the user datawriter. If your importer is setting the warning_points in the user datawriter (which it should be in order to update the counter after importing warning records) then this function should already be called.
 
Top Bottom