Skip to Content Skip to Menu

[SOLVED] User group control

  • ejde
  • ejde
  • OFFLINE
  • Posts: 60
  • Thanks: 9
  • Karma: 0
8 years 6 months ago - 8 years 5 months ago #281563 by ejde
[SOLVED] User group control was created by ejde
I have a site with a single plan, where we want to separate users into a unique group called "customer," which is a child group of the Joomla built-in Registered group.

I have set the "Subscribers User access level settings" setting to the "customer" user group.

New plan buyers are being assigned to the "customer" group, but they also remain a member of the registered group. How can I have the system automatically remove them from registered whenever they are assigned to the customer group? We do not want users to be members of both groups.
Last edit: 8 years 5 months ago by beat. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
8 years 6 months ago #281597 by beat
Replied by beat on topic User group control
This is not possible only with CBSubs, but with CB Auto Actions using the Usergroup action and setting its usage to Replace Usergroups

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • ejde
  • ejde
  • OFFLINE
  • Posts: 60
  • Thanks: 9
  • Karma: 0
8 years 6 months ago - 8 years 6 months ago #281658 by ejde
Replied by ejde on topic User group control
Unfortunately, 99 Dollars is not in the budget for such a simple need. Is there any way to buy CB Auto Actions without having to purchase a full Professional membership? I have purchased that membership before (it just expired), and for the three months I had it, I downloaded just the AntiSpam plugin. It would be nice if these items were offered a la carte.
Last edit: 8 years 6 months ago by ejde.

Please Log in or Create an account to join the conversation.

  • ejde
  • ejde
  • OFFLINE
  • Posts: 60
  • Thanks: 9
  • Karma: 0
8 years 6 months ago #281716 by ejde
Replied by ejde on topic User group control
OK, I've re-upped my Professional subscription. Can you tell me what trigger I should use?

Here's what I want - after successful payment, I want to change users from the Registered group to the Customer Group. I have turned off the CB Subs feature inside the plan that changes usergroups.

Here are the settings I've made in the Auto Actions plugin:
Trigger: OnCPayAfterPaymentBasketUpdated

Type: Usergroup
User: Automatic
Custom ACL: Everybody

Action: Replace Usergroups
Groups: Customer

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 6 months ago - 8 years 6 months ago #281727 by krileon
Replied by krileon on topic User group control
The below usage should work for you.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
Action
Mode: Replace Usergroups
Groups: YOUR_GROUP_HERE

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A
Action
Mode: Replace Usergroups
Groups: Registered

This would be done with 2 actions. 1 will replace the usergroups with the one you've specified and the other will reverse it back to registered on expiration.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 8 years 6 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • ejde
  • ejde
  • OFFLINE
  • Posts: 60
  • Thanks: 9
  • Karma: 0
8 years 6 months ago #281731 by ejde
Replied by ejde on topic User group control
Thank you. My only question is about the conditionals. Does this look right?
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum