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

Duplicate No ban_user_id for warning bans

#1
Hi there-

I know this has been posted before under: https://xenforo.com/community/threads/bug-while-banning-with-warning-points.99795/

Since that thread is in the "resolved" forum I didn't know if I should reply there (so I posted here).

In that thread, it's mentioned that the ban_user_id is intentionally left as 0 which is annoying but fine. It's also mentioned, however, that the triggered column should be set to 1 if the ban was caused by a warning action. For us, it looks like some banned users have triggered set to 1 and some are 0.



Looks like the permanent bans are triggered but the temporary bans are not. What's weird is (A) the inconsistency and (B) that all of our warning actions are temporary bans, not permanent.

Thoughts?
 

Mike

XenForo developer
Staff member
#2
The ban_user_id indication is correct as per that report. The logic/reasoning is the same.

Triggered indicates that it may not be a "normal" permanent ban but the end date is unknown (as it's triggered by an external event; in the case of warnings, point expiration).
 
#3
The ban_user_id indication is correct as per that report. The logic/reasoning is the same.

Triggered indicates that it may not be a "normal" permanent ban but the end date is unknown (as it's triggered by an external event; in the case of warnings, point expiration).
I understand that, but I think you missed my issue. In the other thread, Chris said a warning action should result in a ban with triggered set to 1. Our temporary bans caused by warning actions don't have triggered set to 1. That's what I'm trying to figure out.
 

Mike

XenForo developer
Staff member
#4
It wasn't an entirely correct summary. If your bans are based on point expiration, they will be "triggered"; if they are time based, they won't have that flag. You can see the logic in XenForo_Model_Warning::triggerWarningAction().