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

XF 1.1 Usergroup promotions cron does not demote members

Discussion in 'XenForo Questions and Support' started by Akela, Jan 25, 2013.

  1. Akela

    Akela Active Member

    I do not seem to have much luck with the usergroup promotions cron demoting members...

    I have an Ads group for users with 0 - 24 posts. At 25 posts they should be removed from the group and hence no longer see the ads.

    I keep getting reports from users that they can see ads when they are anywhere from 25 to 500 posts. This has been going on for months. I also have a test user with 30 posts. Running cron manually does not remove the account from the Ads group.

    I also noticed that Ads somehow gets set as the default usergroup. Could this be part of the issue? Or did I misunderstand the promotion/demotion function?
  2. Akela

    Akela Active Member

    My own admin account (almost 4000 posts) has been added to the Ads group during the last manual cron run. :confused:
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What is the exact criteria of your promotion?

    To be clear, promotions add users to groups if they meet the criteria. If a user gets added to the group (promoted) and then later no longer meets the criteria then they will be removed from the group (demoted). Demotion can only happen if they previously were given the promotion.

    In your case the proper implementation would be to promote users to an ad-free group after they reach 25 posts, and then your ads would use a condition that excludes members of that group from seeing the ad.

    <xen:if is="!{xen:helper ismemberof, $visitor, 5}">
    Akela likes this.
  4. Akela

    Akela Active Member

    Thank you very much, Jake. I will try the code.
    Still, I am very curious to know what is wrong with my cron...

    My promotion criteria for group Ads.
    Promotion Options:
    - Add user to user groups: Ads, Registered
    (I added Registered group into the promotion because a few members somehow ended up being automatically removed from it.)

    Apply This Promotion While... /
    - User State Is: Valid
    - User has posted at least X messages: 0
    - User has posted no more than X messages: 24

    Custom User Field Criteria:
    - no settings

    ^ the following settings somehow add myself and other users with hundreds of posts into the Ads group...
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try inverting it like I said. Promote to an ad-free group after 25 posts.
    Akela likes this.
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  7. Akela

    Akela Active Member

    All right. The ad-free group is 22.
    <xen:if is="!{xen:helper ismemberof, $visitor, 22}">
    Ad code
    Both myself and some members can still see the ad... I checked, they are in the group.
  8. Akela

    Akela Active Member

    The code was added into a Rotating Ads unit. Is there a chance it does not recognize the xen:if... format?
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Is that an addon? The conditional I posted is for use in templates.
  10. Akela

    Akela Active Member

    It's an addon.


Share This Page