When I add a user to two user groups, the second group that I add becomes the primary_group, even if the other group that was already assigned has a rank of 0 and is the first in the list. I have to drag and drop the two groups a few times to make the group that should be primary the primary group again. Is this the expected behavior? If I change the numbers in the 'rank' column the save button is not enabled, so I can't change it that way.
Also this is confusing for my clients, because they expect the group that is already in the list and is the first item in the list, to stay the primary_group, even if they add a second user group. Only if they would drag and drop to change the order, they would expect the primary_group to change. Because of the change of primary_group, the user sees the wrong dashboard.
MODX 2.2.10
-
☆ A M B ☆
- 2,475 Posts
Sounds like it's plausibly a bug. Is there another way to edit the user's memberships? Might a "maintenance" script help shepherd these into the proper place?
That might be a good idea, like a plugin that fires when you save a user?
Only problem is, how do you know which group should be the primary group for a specific user...
-
☆ A M B ☆
- 2,475 Posts
Looks like you could leverage the OnBeforeUserFormSave event... I'm not sure where that "primary_group" field is mapped in the GUI...