When a user is assigned a primary role they are also assigned the corresponding secondary role. If the user’s primary role is changed the corresponding secondary role remains, leaving them in both member groups. How can I configure EE so that secondary roles match primary roles?
For example:
Member registers and is assigned to “all access” role. This is applied to their primary and secondary roles. Member downgrades account and is moved to “partial access” role. Their primary role reflects this, but now they are members of both “all access” and “partial access” secondary roles.
TIA
The User add-on edit function and its corresponding select_member_groups variable pair. A shortened version of the working form:
{exp:user:edit allowed_groups="5|9" return="directory/profile"}
<select name="group_id" class="med">
{select_member_groups}
<option value="{group_id}" {selected}>{group_title}</option>
{/select_member_groups}
</select>
{/exp:user:edit}
So I believe that tag in User will just set the Primary role… Not sure if you can setup your template checks to be against primary role for what your building?
We discussed this one internally, sounds like we need to add a remove role to the EE Core, as it’s currently missing.
Thanks,
-Tom Jaeger
Yes, the tag in User is changing the Primary Role, which is what it is needed to do – the issue is with the Secondary Role that remains unchanged.
The website caters to a private, members-only group with two member groups/roles: “receive all notifications” (receives an email alert any time content is added/changed) and “receive official notifications” (receives an email alert when information that the organization is required to send to its members is added/changed.)
When a pending member is approved they are added to the Primary Role “receive all notifications.” (This process also adds them to the same Secondary Role, which is assumed to be expected behavior.) Users who prefer to receive fewer notifications have the option to change their Primary Role to “official notifications,” but doing so does not change the Secondary Role and they effectively remain in both Roles: their Primary Role is “official notifications” and their Secondary Role is “all notifications.”
The add-on used to generate emails to members (Mail After Edit) is Role based and does not differentiate between Primary and Secondary Roles. As a result, messages that are configured to go to the Primary Role “receive all notifications” are being delivered to all members because all members have “receive all notifications” as either their Primary and/or Secondary Role.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.