XF 1.5 Multiple Usergroups Permission Handling

king8084

Well-known member
I'm struggling with a User Upgrade scenario, where when the user has the upgrade applied, the applied secondary group's permissions aren't respected. This issue isn't specific to any single add-on, but in particular, I'm using @Siropu 's "Username Change" add-on where the secondary group applied is a change to a numeric value ("minimum days between changes") to be a lower value than what's applied to the primary "Registered" usergroup. i.e., the user will have a value on both the primary and secondary usergroup that they're a member of. From what I've read across the forum, the higher value is always chosen, based on core Xf functionality (and I need it to be the lower value).

So, how can I achieve this? The User Upgrade doesn't allow for an adjustment to the primary usergroup, and is restricted to simply adding the member to a secondary group. I can't think of a logical way to make this work.
 
Here is one way around it:

Why not set the primary user group (registered) minimum days to the lowest value, and then set higher values for secondary user groups?

For example: secondary user groups contain Silver members - 30 days, Gold members - 15 days, Platinum members - 5 days

Registered user group minimum days between changes : 5 days +Silver members 30 days = 30 days
Registered user group minimum days between changes : 5 days +Gold members 15 days = 15 days
Registered user group minimum days between changes : 5 days +Platinum members 5 days = 5 days
 
Here is one way around it:

Why not set the primary user group (registered) minimum days to the lowest value, and then set higher values for secondary user groups?

For example: secondary user groups contain Silver members - 30 days, Gold members - 15 days, Platinum members - 5 days

Registered user group minimum days between changes : 5 days +Silver members 30 days = 30 days
Registered user group minimum days between changes : 5 days +Gold members 15 days = 15 days
Registered user group minimum days between changes : 5 days +Platinum members 5 days = 5 days
Let me know if I'm understanding you incorrectly, but doing the above would require adding the "+Silver" secondary user group to all members (while lowering/removing the criteria from the Registered group), and then utilizing the user upgrade to apply the +Gold & +Platinum groups, correct?

In which case, wouldn't I be left with the same issue? i.e., the user group upgrade would apply +Gold, which would have 15 days, but the user would still also be a member of +Silver. The problem here would lay with the fact that (from what I can tell) the user upgrade functionality doesn't allow you to remove a user from a group, while simultaneously adding them to another.

Am I tracking your suggestion correctly?
 
You would use the user upgrade to remove a member from, for example, the silver group and add them to the gold group. This is just one way, but it will accomplish what you want, :)
 
You would use the user upgrade to remove a member from, for example, the silver group and add them to the gold group. This is just one way, but it will accomplish what you want, :)
I'm still not sure this would work. Doing so would require me to add ALL active + future members to the user upgrade that has the higher value. Are you aware of a way to do this en mass + automatically for new users moving forward? I don't think this approach would work without doing so.
 
Back
Top Bottom