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

Banned Users do not go into the Banned Usergroup.

Discussion in 'XenForo Questions and Support' started by faeronsayn, Aug 25, 2011.

  1. faeronsayn

    faeronsayn Well-Known Member

    I just noticed this, after I ban a user through the ban user option in the Users tab in your Admin CP, it just bans them but does not put them in the "banned" usergroup. Since I have user ranks / user title for banned users, I really need for them to go to the banned users group.

    Not sure if this is a bug, or its suppose to work like that, but I was wondering why it did not do that, and actually how to make it so the user goes in the banned usergroup once you ban the user whether that'd be permanently or a temporary ban, it should put them in the banned usergroup.

    Also I use a mod that lets you infract / warn users, and if users get that amount of infractions they would get banned for several days, when moderators ban users through that method, it still does not put the user into the banned usergroup.

    Hope I can get some help on this.
  2. Walter

    Walter Well-Known Member

    Xenforo per default has no usergroup "banned members" like vb has. When you ban a member it only sets a flag in the user account.
    Dean likes this.
  3. faeronsayn

    faeronsayn Well-Known Member

    Any way to make it so the user goes into that usergroup by default? or anyway to change the users title, and add some extra things if a user is banned. Maybe a template condition ?
  4. James

    James Well-Known Member

    You can use the $user.is_banned variable to create template conditions for banned users.
    lasertits likes this.
  5. faeronsayn

    faeronsayn Well-Known Member

    Thank you so much, just a little problem that is occuring on my website.

    I use this template condition right now...

    <xen:if is="{xen:helper ismemberof, $user.is_banned}">
    <CENTER><img src="http://www.shadygamer.com/userrank/banned.png"></CENTER>

    I use this for my other member ranks as well, but whats happening is that, this rank is displaying on all of my members, regardless of them being banned or not.

    For example if we look at this thread.

    All my members have their normal ranks, plus the banned rank, although they are not banned.


    EDIT: Fixed it, instead of using this

    <xen:if is="{xen:helper ismemberof, $user.is_banned}">
    <CENTER><img src="[URL]http://www.shadygamer.com/userrank/banned.png[/URL]"></CENTER>
    I am using this ...

    <xen:if is="{$user.is_banned}">
    <CENTER><img src="[URL]http://www.shadygamer.com/userrank/banned.png[/URL]"></CENTER>
    This is working fine.
  6. ragtek

    ragtek Guest

    if you NEED the usergroup (i client needed this for a external application)
    create a new usergroup for banned users, extend the user datawriter, if the is_banned flag is changed, (re)move the user automatic to the group;)
  7. faeronsayn

    faeronsayn Well-Known Member

    all of that went over my head. :(
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Or you could just create a banned user group and manually move members into it.

    Why do banned users still show as normal members and appear in the member list?
    This is the designed behavior; there is no outward indication that a member has been banned. Their user title stays the same and they will still appear in the members list. If required, you can manually change a banned member's user title, or create a user group with a higher display styling priority and add them to it. To prevent them from appearing in the members list you can change the user state to anything other than valid.

  9. faeronsayn

    faeronsayn Well-Known Member

    The manual thing will obviously not work when you have several different moderators that can ban users through infractions, and they do not have access to the AdminCP, meaning it will be up to me to track down which members were banned and then manually add them to the usergroup.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    You can grant access to certain areas of the ACP to your moderators if you trust them.

    Or you can ask your moderators to post in a thread when they ban someone.

    Ultimately, you will have to come up with a system which works for you.
  11. ragtek

    ragtek Guest

    Add-on is in development;)
    faeronsayn and Deebs like this.
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Or wait for ragtek's add-on ;)
    faeronsayn likes this.
  13. ragtek

    ragtek Guest

  14. CyclingTribe

    CyclingTribe Well-Known Member

    Hang on ... did you just create the add-on in 20 mins.? WOW!!! :cool:
  15. ragtek

    ragtek Guest

    39 with creating an automatic selenium test, running it several times and creating a new build because i called the false method[​IMG]
    GeeksChat likes this.
  16. MGSteve

    MGSteve Well-Known Member

    Actually, just checked in 1.1 and you don't need this mod, it can be done via the User Promotion system.

    it appears you can anyway, you can select the "Banned users" group as the group to add the user to & then on the 'Apply this promotion while...' box, there is an option for 'user is banned'.
    faeronsayn likes this.
  17. Brogan

    Brogan XenForo Moderator Staff Member

    Unfortunately that doesn't work as the last active time doesn't update for banned users, so they never get promoted, as promotions are only triggered when active.

    I've spoken to Mike about it and he's going to look at a completely separate approach for moving banned users into and out of a defined group.
    dieketzer likes this.
  18. MGSteve

    MGSteve Well-Known Member

    oh ok - thought it seemed a bit too obvious as I didn't think user promotions were new in 1.1.
  19. Brogan

    Brogan XenForo Moderator Staff Member

    User group promotion is new in 1.1.

    It won't work for banner members though, for the reason I explained above.
  20. James

    James Well-Known Member

    I'm sure you can do this with the warning system.

Share This Page