Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Acl level changes depending on number of groups

11 years 8 months ago #220762 by TheFlyingKiwi
Hi

I want to create the following scenario. Free access to members who join 1 group but then an annual subscription to those which to join more than group.

I know I will have to use cb subs for the subscription and access but was wondering how best to go about it in GJive. My thoughts were to set up 2 access levels ie single and multi. Cb subs would control access to multi but how would I set it up so the user was moved from single to multi when they joined another group... Or am I approaching this in the wrong way?

Many thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48458
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #220785 by krileon
You want them to have access to a CBSubs plan when they belong to more than one group or you want to add them to a Joomla usergroup when they belong to more than one group? The context of your post and the title don't related, please clarify what you're wanting to do.

You can use CB Query Field to count the number of groups the user belongs to via database query then use that to condition a CBSubs plan to display or condition a CB Auto Action to add the user to a usergroup (what trigger is up to you, maybe after login?).


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.

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

11 years 8 months ago #220787 by TheFlyingKiwi
Replied by TheFlyingKiwi on topic Acl level changes depending on number of groups
Krileon

Many thanks for your prompt response. You have answered my (badly worded) question. I thought with CBSubs I would have to create a specific access level but that is obviously not how it works.

I will have a look at cb query.

Thanks and regards.
Iain

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48458
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #220794 by krileon
The below query should get you started.

Name: cb_grpcount
Title: Group Count
Query:
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `user_id` = '[user_id]' AND `status` > 0

Now you can use this field to condition your CBSubs plan, condition Substitutions, condition CB Auto Actions, etc..


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum