XF 2.0 Default secondary group?

Escobar

Active member
Hi,

I was wondering if there is a way to assign a default secondary group upon registration? So once the email is verified the group will automatically get assigned.

Thanks in advance
 
You can create a user group promotion but what is the purpose?

If members are automatically going to be in the Registered user group and another group, why can't you just use the Registered user group?
 
You can create a user group promotion but what is the purpose?

If members are automatically going to be in the Registered user group and another group, why can't you just use the Registered user group?
As i have another usergroup with certain permissions which registered people should have upon registering. The registered usergroup holds the main permissions for all the usergroups. And with a usergroup promotion its not instant because as far as i know does this works with chron and running a chron every minute will only slow down the forums right?

is there no script i can update or something that allows me to do this?

like for example would this work https://xenforo.com/community/threads/addong-a-default-secondary-group.33590/?
 
Last edited:
If you have set your registration to "confirm via email", users will be promoted to the Registered group only when they actually confirm their email.

Edit: Actually, screw that, they are still added to Registered anyways. The secondary group is assigned upon email confirmation.
 
If you have set your registration to "confirm via email", users will be promoted to the Registered group only when they actually confirm their email.
I know this but i am wondering if besides the primary group it can also assign a secondary one. For example primair: Registered Secondary: group i want automatically when the user registers
 
It's as Brogan said, you can create a user group promotion for that. A general one, just set the criteria to "User is logged in". Afaik promotions this way are done instantly and not via cron.
 
It's as Brogan said, you can create a user group promotion for that. A general one, just set the criteria to "User is logged in". Afaik promotions this way are done instantly and not via cron.
So what would the creteria be? because i only want new members who ust signed up in the secondary group ot everyone on the forum. i assume if i set it to user is logged in everyone will get into this group
 
Every user *should* have a group, if not, something's fishy.
Anyways, just look at the criteria, you can choose in which group they shoud *not* be. Just check all except for Registered I guess.
 
As i have another usergroup with certain permissions which registered people should have upon registering. The registered usergroup holds the main permissions for all the usergroups.
I'm confused as to why you don't just give all of these permissions to the Registered usergroup as essentially that's what you want all registered people to have.

Why do you (think you) need a secondary user group with these extra permissions? What's the purpose of keeping them separate if every registered member is to get them? A bit more explanation on what you are trying to achieve might help in providing you with a solution.
 
I'm confused as to why you don't just give all of these permissions to the Registered usergroup as essentially that's what you want all registered people to have.

Why do you (think you) need a secondary user group with these extra permissions? What's the purpose of keeping them separate if every registered member is to get them? A bit more explanation on what you are trying to achieve might help in providing you with a solution.
My forums is a closed community and only people who have given access have access. The registered usergroup works wth all other permissions but to make sure nobody can view anything we have a secondary usergroup which keeps them from visiting the rest. Which has to be given to the registered user otherwise he can see everything
 
I agree with @AndyB , something doesn't seem right with your setup. If things are set correctly, the Unregistered group (which is guests and those who have registered but are unconfirmed) will only see the forums you want them to see and the Registered group will see all forums that you give them access to (ie they'll see forums that the Unregistered group won't see).
 
Here is the problem. He wants that when someone registeres (and is validated) that he only sees 2 nodes.

Now if you would put the registered usergroup to only see 2 nodes, then the other 12 (yes 12) usergroups must be given 1 by 1 each of them the extra permissions the registered doesn't have.

So the better solution is not to do that. The better way is that the registered usergroup has all the default rights the other 12 would have. Like not seeing only 2 nodes, but seeing everything (or most of them). And like what basic permissions (edit profile etc.) all would have.
Then we wouldn't have to go through all other 12, as the registered would take care of everything, the 12 would inherit. Just like most forums do.

But then again, he wants that the freshly registered user doesn't see everything. It is a closed circle. But as the new registerted user is automatically in primary usergroup registered, he would see everything, as that group is primary for all.

So, what is the solution? Yes, to demote the user after registration to a secondary usergroup, which only can see 2 nodes.
BUT XF's cron can at best run every minute. That is the problem here.

So what happens here? The user registers, is validated, and now is in primary usergroup registered. For 1 minute he can see everything. The cron runs, and he is put to secondary usergroup "2 nodes", and now he can only see 2 nodes as it was meant to be.

I hope I could explain the problem.
 
Last edited:
Here is the problem. He wants that when someone registeres (and is validated) that he only sees 2 nodes.

Now if you would put the registered usergroup to only see 2 nodes, then the other 12 (yes 12) usergroups must be given 1 by 1 each of them the extra permissions the registered doesn't have.

So the better solution is not to do that. The better way is that the registered usergroup has all the default rights the other 12 would have. Like not seeing only 2 nodes, but seeing everything (or most of them). And like what basic permissions (edit profile etc.) all would have.
Then we wouldn't have to go through all other 12, as the registered would take care of everything. Just like most forums do.

But then again, he wants that the freshly registered user doesn't see everything. It is a closed circle. But as the new registerted user is automatically im primary usergroup registered, he would see everything, as that group is primary for all.

So, what is the solution? Yes, to demote the user after registration to a secondary usergroup, which only can see 2 nodes.
BUT XF's cron can at best run every minute. That is the problem here.

So what happens here? The user registers, is validated, and now is in primary usergroup registered. For 1 minute he can see everything. The cron runs, and he is put to secondary usergroup "2 nodes", and now he can only see 2 nodes as it was meant to be.

I hope I could explain the problem.
Thanks for explaining it :P
 
Now if you would put the registered usergroup to only see 2 nodes, then the other 12 (yes 12) usergroups must be given 1 by 1 each of them the extra permissions the registered doesn't have.

Do it this way as that is how XenForo is designed.

The better way is that the registered usergroup has all the default rights the other 12 would have. Like not seeing only 2 nodes, but seeing everything

You can still give all the same permissions for the registered user group excpet the "view" permission for those other forums that will get that access as you give those secondary user groups.
 
  • Like
Reactions: sbj
You can still give all the same permissions for the registered user group excpet the "view" permission for those other forums that will get that access as you give those secondary user groups.
Yeah, that was my solution to the problem. But just it is not about the view, it is also about other permissions.
Anything what the registered is allowed to do or not do to, is affecting everyone, also the "2-node" usergroup. So everything what is taken away, like the view, or all the other stuff you don't want "2-node" to have, like post profile posts, etc. etc., we must now give manually to the other 12 in addition because of that, not just the view one.
 
Top Bottom