XF 1.5 Users Stuck in Banned User Group

Recep Baltaş

Well-known member
We have a user group for temporary banned users. Bans are usually a day, a week or a month. The problem is, after the expiration of the warning, some users a are not being promoted to their original group and they get stuck in the banned state.

There are a lot of users in that state who have no warnings but can not take part in the forum. How can we batch update the situation of these users?
 
Based on your wording ("promoted to their original group"), it sounds like their primary group was changed. This isn't something XF does, so it wouldn't be a change from XF.

You also mentions warnings, though the banned user group system is attached to bannings rather than warnings, though warnings can trigger group changes.

Can you demonstrate the issue more specifically?
 
OK, I will try to explain it as clear as I can:

  • First of all, here are all the user gropus we have:

    upload_2017-2-2_10-42-48.webp
  • Those are from top to bottom:
    • Users with Warnings
    • Registered Users
    • Registered Users with less than 100 posts
    • Mods
    • Super Mods
    • Admins
    • Visitors / Unverified Users
How does our system work?

We have penalties for different behaviours. Here they are: (Uyarılar means Warnings)

upload_2017-2-2_10-48-38.webp

For example, Multiple Accounts:

User get 1 Point for this. And 1 point is 1 day becoming a part of "Users with Warning" Group.

upload_2017-2-2_11-6-5.webp

And this is the system that adds user to that group. If they have 1 point, they are also added to Warned User Group where their rights are restricted.

upload_2017-2-2_10-48-5.webp

After a day, they are removed from the Warning Gropup and they are just plain in the Registered User Goup. But that does not always work as intended. It gets stuck.

Her is a user with warning:

Main Group: Registred Users
Secondary: Warned User Group.

upload_2017-2-2_11-4-53.webp
 
Last edited:
We alse have Warning Improvements 1.4.7 intalled. But interestingly, it shows that warnings do not expire:

upload_2017-2-2_11-8-35.webp

Yok means no. But there is actually an expiration date which is 1 day. And users are removed from warned state after 24 hours. Most of the time.
 
Is there any consistency to this? If you give a user a warning and then immediately expire it, is the behavior consistent? (Consistent either way, though we'd ideally need to find a situation where it fails every time for testing.)

Unfortunately, I'd really need to recommend testing with add-ons disabled -- this would mean both when giving the warning and when it expires. This isn't something I've heard of before, I don't believe, so I have to guess that there may be an add-on involved -- especially if the warning action is still showing as active.
 
@Recep Baltaş you have the warning configured to expire when "While at or above points threshold" rather than time-based, this is triggered off the warning point totals stored on the account and not the actual total of non-expired warning points from warnings.

Can you verify that an affected account's warning point total matches the warning points for non-expired warnings?
 
@Recep Baltaş @Xon

After doing a number of tests I have ascertained that there is a specific reproduction case and the bug only occurs when the Warning Improvements add-on is enabled.

The reproduction steps are:
  • Give a user two warnings. It doesn't appear to matter which.
  • For testing purposes I rolled back the expiry_date by 86400 seconds
  • Run the Handle expired warnings cron
With the add-on enabled, the warnings will both expire and the points will reset to 0 but the warning trigger will remain, and so will the user group change.

With the add-on disabled, the warnings expire and the warning action is reversed too.

So, unfortunately, this definitely seems to be an add-on bug.
 
@Chris D Thanks for nailing it down. Could you share a simplified warning/warning action configuration so I can fully reproduce this?

Also what version of Warning Improvements ?
 
Last edited:
Can't recall version.

Just needs one warning that issues 1 point then an action that sets a temp user group and applies when points are at or above 1 point.

Apply two warnings and the action will kick in. When the cron expires both of those - presumably at the same time - they are both expired but the effect of the action still applies.
 
@Chris D I can replicate this behaviour with stock XenForo 1.5.13

Issue a warning with one point, and expiry of zero, and it will issue an expired warning with the points permanently stuck on the account (and thus the warning action which triggers based of threshold will never be removed). Deleting the warning doesn't help either!

Warning Improvements 1.5.6 appears to prevent me from being able follow your replication steps as it appears to work correctly, as it contains a workaround for the above bug. My guess is the default warning points/expiry is being set when my add-on is active, thus exposing the issue rather than XF's standard values which hide it.
 
I am using 1.5.6 but yeah, I was using older versions too. There are two things now:
  • Check users stuck in the demoted usergroup and move them to registered users
  • Prevent the problem happening again ( I think there is still problem with v1.5.6)
 
@Chris D, I've replicated the issue now, and it does look to be a fault in my add-on somewhere. I'll investigate and fix it, what threw me is this is near identical behaviour to a reported XF bug.
 
Back
Top Bottom