My ask here is similar to my use case in this post:
www.joomlapolis.com/forum/developer-members-support/247045-automatically-moving-members-from-one-group-to-another-on-expiration#339232
, where I wanted expiring members to be moved from a "Paid Member" usergroup to a "Free Member" usergroup (instead of just the standard Joomla "registered" one, which CBSubs does by default). The solution is an AutoAction as described below:
Global
Triggers: onCPayUserStateChange
Type: Usergroup
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Action
Action 1
Mode: Remove Usergroups
Usergroups: REMOVE_USERGROUP_HERE
Action 2
Mode: Add Usergroups
Usergroups: ADD_USERGROUP_HERE
Replace PLAN_ID_HERE with your plans id. That auto action should then fire when their plan expires. If you know they'll only have those 2 usergroups you can just use the Replace Usergroups mode.
I am looking to do something that is, in a way, the reverse.
This new use-case came about because I discovered that when "Free Plan" members who are in a Free Plan usergroup upgrade to a Paid Plan, they are not only added to the "Paid Plan" usergroup but also kept in the "Free Plan usergroup.
I'd like the ability to remove a user from the "Free Member" usergroup when they upgrade, and wondering if I should use the same trigger "onCPayUserStateChange"
The reason this has become a problem is that I have some AutoActions that limit access to certain things to Free Members based on which user group they are in. That being said, I may be able to revise these autoActions since there is now a "Subscriptions" condition instead of currently using the "usergroups" condition.
Regardless, I think it will be too confusing to have members in two user groups (It also makes it harder to filter searches in the backend). Could I get some advice on how best to remove users from a usergroup upon a plan change that is an upgrade or renewal?