XF 2.1 User group promotion when user is banned

Brettflan

Active member
I have added a User Group Promotion which is set to add the user to a "Banned" usergroup (basically just a display group I created along with a rank image to show everyone else they're banned), set to be applied on the condition "User is banned". This works correctly, adding banned users to the group so that they are shown as banned to everyone.

The problem is, when we occasionally need to lift a user's ban, this user group promotion does not ever properly clear out. I do understand that promotions are only updated once an hour through an admin panel cron job; this problem has been observed on a couple of occasions a few days later, and several more times a few hours after the ban is lifted. Even though they are no longer banned, they stay added to the "Banned" usergroup. Due to the wording of the promotion, "Apply this promotion while..." (particularly the "while" part of that), the promotion should be automatically removed once it no longer applies, right?

It is of course quick to fix in each individual case, but it does require us to have someone with admin panel access to fix it, where our super moderators are able to ban and unban, but they have no way to fix it themselves.

I mainly just want to be sure before I create a bug report for this that it is indeed a bug.
 
User group promotions will only kick in if a user is active, so if a user hasn't been around for a while will still show as being in the banned user group until they return to the site, at which point they should then be removed from the user group if they are no longer banned.

Also not that if you manually add or remove people to the banned user group, the promotion/removal from the group will no longer happen automatically (as manual additions/removals overrides this).
 
It seems to me that it'd be better to use the "Add user group on ban" option than a promotion in this scenario. It should trigger instantly in both the ban and unban cases.
 
User group promotions will only kick in if a user is active, so if a user hasn't been around for a while will still show as being in the banned user group until they return to the site, at which point they should then be removed from the user group if they are no longer banned.
Ah, that's right. I'd forgotten that promotions only triggered if the user had been active lately.

It seems to me that it'd be better to use the "Add user group on ban" option than a promotion in this scenario. It should trigger instantly in both the ban and unban cases.
OK, that option looks like what I should be using instead. I hadn't seen it before. Thanks, I'll switch to it.
 
Top Bottom