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

Usergroup promotions don't change primary group?

Discussion in 'XenForo Questions and Support' started by Liam W, May 19, 2013.

  1. Liam W

    Liam W Well-Known Member

    How can I make it so that the primary user group is changed during a promotion?
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Martok

    Martok Well-Known Member

    I couldn't understand the permissions design when I first moved to Xenforo from phpBB simply because I wasn't used to how it worked. Now it makes perfect sense and I can't see a reason why I'd need to make another group into the primary group.

    Having said that, I'm also unsure why there's a primary group at all. Why not just have usergroups that a user is a member of with no distinction?
    James likes this.
  4. Liam W

    Liam W Well-Known Member

    I have a zero posters user group, with a promotion connected to it. I was going to email all the zero posters, when I noticed some non zero posters were in the list as well.

    Why is it like this? There should be an option as to whether to change primary user group or add to a secondary one.
  5. Chris D

    Chris D XenForo Developer Staff Member

    I still don't see a need for the primary group to change in that scenario.

    Perhaps your criteria for the promotion is incorrect.
  6. Liam W

    Liam W Well-Known Member

    No it isn't. I need to change the primary user group, because if I don't and I want to email all the zero posters, I'll also be emailing the promoted users as well.

    In other words, everyone is in the zero posters usergroup as a primary usergroup, which is wrong.
  7. Tracy Perry

    Tracy Perry Well-Known Member

    From what it sounds like... your setup for usergroups is "wrong"?
    You are using the default usergroup that everyone goes into up0n registration as your "zero posters"? If so, then yes, everyone WILL be a member. You need to set up a separate usergroup for the zero posters and not even worry about using the default registered member group.
    Then set up a usergroup promotion that posters have posted no more than x messages. Then use THAT usergroup for your "zero posters".
    If I understand correctly, once a user exceeds that amount of posts they should be removed from that usergroup when the CRON job runs for promotions (if it doesn't then there needs to be some code modifications to the core to allow this).
    I HAVE found that sometimes for some users, the promotions don't work... still haven't figured out why.
    Martok likes this.
  8. Chris D

    Chris D XenForo Developer Staff Member

    Tracy has just explained exactly what I was about to say.
  9. Liam W

    Liam W Well-Known Member

    Well then that's a silly system, and needs much more work than it should to setup.

    My way was fine with vB, why isn't it here? Very silly indeed.
  10. Martok

    Martok Well-Known Member

    Not silly at all. Groups with cumulative permissions make a lot more sense than single groups each with slight variations on permissions. It doesn't need much more work to set up either. Yes, it works differently from other forums but it doesn't mean it's stupid, if anything it's more intelligent.
    Tracy Perry and Andrej like this.
  11. Tracy Perry

    Tracy Perry Well-Known Member

    Actually, once you get used to it, it really makes sense and works well. It's just a matter of apples/oranges. It (and the usergroup permissions) took me the longest time to get used to. Basically, just remember that the registered (whatever you call it - I call it Members on my forum) group is just a catch all for everyone... all groups after that are special that you configure for whatever. It allows a LOT of control.
  12. Chris D

    Chris D XenForo Developer Staff Member

    We all must be stupid, guys. Don't worry. Liam's way is clearly better!
    Jeremy and Brogan like this.
  13. Liam W

    Liam W Well-Known Member

    There was absolutely no need for that. I would report it, but I doubt it would do anything.

    Sorry if I wasn't nice or anything :/

    I'm just trying to figure out a way to do this.

    Default usergroup: Member
    Promotion: if posts is 0 move to zero posters

    Then when they post, they will be removed from zero posters.

    The only issue I can see is the fact the promotions don't update every second :/
  14. Chris D

    Chris D XenForo Developer Staff Member

    Don't worry. I apologise for my comment. And you haven't made any enemies :)

    It's just frustrating to see the way we all do it (and is the right way) referred to as "silly" or "stupid".
  15. Liam W

    Liam W Well-Known Member

    The right way can be the wrong way in some instances. I still need a way to make this work correctly :/

    And I can't think of one!
  16. Tracy Perry

    Tracy Perry Well-Known Member

    You can adjust how often the cron job runs... that IS a weakness in the system, but how often are you going to need to send email to zero posters? You won't miss more than 24 hours (as it sits if I remember correctly) of members. If you adjust your CRON job, even less. If you have a LOT of members, I would not adjust where it runs TO often as there can be some system impact. That should be resolved in 1.2 if I read correctly.
  17. Martok

    Martok Well-Known Member

    The default for the user group promotion cron is every hour so it should be fairly accurate as it is.

    Just set up a promotion to a 'zero posts' group with the criteria 'user has posted no more than X messages' and set this to 0.

    That should do the trick.
    Tracy Perry likes this.
  18. Filetrip

    Filetrip Member

    You could always run the cron manually I guess.

    This actually makes me wonder why there even are primary groups.
    Are there any advantages at all of putting someone in a primary group?
    Why not just hardcode it to "Registered"?
  19. Liam W

    Liam W Well-Known Member

    The issue is, zero posters have limited permissions including the fact that their posts must be moderated (technically the users first post).

    With this system, people would have have a maximum five hour leeway, in which their first post won't need to be moderated.

    I have the cron set to five minutes :)

    See where the issue is?
  20. AlexT

    AlexT Well-Known Member

    If you know how to write add-ons, you could hook the user datawriter and add newly generated users to any secondary usergroup you wish (such as the zero posts usergroup).
    Jeremy likes this.

Share This Page