• 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?

Martok

Well-known member
#3
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?
 

Liam W

Well-known member
#4
That would require an add-on or code changes and would defeat how the permissions system is designed to work.

http://xenforo.com/community/resources/implementing-permissions-across-multiple-user-groups.358/
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.
 

Chris D

XenForo developer
Staff member
#5
I still don't see a need for the primary group to change in that scenario.

Perhaps your criteria for the promotion is incorrect.
 

Liam W

Well-known member
#6
I still don't see a need for the primary group to change in that scenario.

Perhaps your criteria for the promotion is incorrect.
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.
 

Tracy Perry

Well-known member
#7
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.
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.
 

Liam W

Well-known member
#9
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.
 

Martok

Well-known member
#10
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

Well-known member
#11
Well then that's a stupid 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.
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.
 

Liam W

Well-known member
#13
We all must be stupid, guys. Don't worry. Liam's way is clearly better!
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 :/
 

Chris D

XenForo developer
Staff member
#14
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".
 

Liam W

Well-known member
#15
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".
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!
 

Tracy Perry

Well-known member
#16
The only issue I can see is the fact the promotions don't update every second :/
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.
 

Martok

Well-known member
#17
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.
 
#18
You could always run the cron manually I guess.

That would require an add-on or code changes and would defeat how the permissions system is designed to work.
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"?
 

Liam W

Well-known member
#19
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.
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?
 

AlexT

Well-known member
#20
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).