The determination of which group to set can _only_ be determined by custom logic. It involves processes outside of CB and custom creation of user groups and viewlists. E.g. we are conditionally creating the group, and doing a few affiliate-related actions as well. The plugin is necessary.
As to "user store override" -- I am directly writing to the #__user_usergroup_map table during signup, associating $user->id (from the $user object passed to the event). There are no other CB-related objects involved unless they somehow override JFactory::getDbo() in order to accomplish it.
In short, I'm sorry, but this is not a solution. The code we've spent a month of development on is finished except for this problem.
PS: Also to clarify, we are allowing CB to complete the registration without interference (you had supposed we were manually storing the user; no, we're just manually storing #__user_usergroup_map entries after CB creates the user).
PPS: And to make things as super-clear as possible, the relevant part of our plugin in a nutshell:
onCPayUserStateChange:
- determine the event (using a copy-paste of the if/elseif block from page 3 of the CBSubs_devkit_integrations_API_doc pdf)
- if we have an event, switch on it:
-- case pendingfirst or activation we grab outside data from mysql to update & act on
--- these cases do not break
-- next are cases renewal and autorenewal
--- if the event was activation, add the user to two different groups (one for Paid status, another for a group chosen/created by the user who invited them)
--- else check if the user is in the Payment Expired group; if so, remove them from it, add them to the Paid group, and set them to an arbitrary number of other groups based on their memberships prior to expiration (stored in a table outside CB)
--- (these cases do break)
I include this information to help you see, as efficiently as possible, that we really need a solution closer to what was explicitly requested - whether it's a different event I could use for these actions (with the same data about the event, after whatever's happening here), or a patch, (or a setting we're missing). We just need "No change of user group" to apply to everything except our code.