Skip to Content Skip to Menu

Membership in multiple groups - do we have something mis-configured?

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
10 years 1 month ago - 10 years 1 month ago #248843 by mikerotec
I'm having some issues with another extension "DocMan" - it won't behave as required when a user belongs to multiple groups. We have three basic groups... 'registered', 'Free', and 'Paid'.

For some reason, whenever a new signup goes through as either "Free" or "Paid" they also get assigned to 'registered'. And when a subscription expires, CBSubs seems to shunt it to "registered'. But if I use Docman to block 'registered', then it also blocks all the "Paid" users who are ALSO simultaneously 'registered' users (they got assigned to that group on creation).

Is there a quick fix for this? Ideally, everyone signed up should either be a "free" subscriber or a "Paid" subscriber - do we have to have this phantom 'registered' user?

**EDIT** OK, after a little more fiddling I see that the "registered" group seems to be a necessary holding tank for users with expired subscriptions. But it seems that then we're going to REQUIRE a new CBSubs DocMan plugin?? ( As advised earlier, in my 3.3.3 installation, I have uninstalled the CBSubs DocMan plugin...)

Incidentally, if someone is not logged in, they are getting Full unrestricted access to everything in DocMan (regular CBsubs articles protection works normally). DocMan developer says that "Public" must have download access, as permissions for all other groups ripple down... but we want public to view docs, but not have download permission. This is all working fine in Joomla 2.5 (with a CBSubs DocMan plugin...)
Last edit: 10 years 1 month ago by mikerotec.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #248858 by krileon
You can use CB Auto Actions to control your usergroups. CBSubs Usergroup handling isn't advanced enough (will be with a future release) to handle your scenario. You can use the below CB Auto Actions usage to control usergroups on subscription state.

Add Usergroup
Type: Usergroup
Triggers: onCPayUserStateChange
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A
Mode: Add Usergroup
Groups: SELECT_GROUPS_TO_ADD_HERE

Remove Usergroup
Type: Usergroup
Triggers: onCPayUserStateChange
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Not Equal To A
Mode: Remove Usergroup
Groups: SELECT_GROUPS_TO_REMOVE_HERE

You can replace usergroups, add new ones, remove them, etc.. as needed. For your case you'll probably want to use the Replace Usergroups mode.


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.
The following user(s) said Thank You: mikerotec

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

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
10 years 1 month ago - 10 years 1 month ago #248870 by mikerotec
OKay, that's an awesome tip. So I can do away with "registered" usergroup at last... :cheer:

We really only need user types "Free" and "Paid".

So, would you advise I set Joomla | Users | New User Registration Group to "Free" - or is it better to set it to "Public"?

I'm not sure what's going on behind the scenes - but could imagine some potential mixups if we use Free as a default group... for example, CBSubs adding in "Paid" group in parallel to Joomla's "Free" when a new subscriber signs up as "paid" right from the start. Is there logic built in to prevent that? Does CBSubs user membership get added before or after the Joomla one? Or is the Joomla default user group value just passed to CB to start with, and Joomla does nothing?
Last edit: 10 years 1 month ago by mikerotec.

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

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
10 years 1 month ago #248872 by mikerotec
One other thing... what is the correct syntax for the Replace UserGroups mode?
I can't seem to find a basic "documentation" for this module, I have looked all over the CB site.

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

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
10 years 1 month ago - 10 years 1 month ago #248873 by mikerotec
Umm... trying to walk through one with no docs... using [cb_usertype] as VAR3 but I don't know what the actual PLAN_ID value is (numeric?? title?? If title, do I put it in quotes because it includes a space??)

Is there some collected user-friendly documentation on all this somewhere?

And the "replace" function, it only gives one dropdown... this doesn't make sense - so where do I specify what replaces what?


Attachments:
Last edit: 10 years 1 month ago by mikerotec.

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

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
10 years 1 month ago - 10 years 1 month ago #248874 by mikerotec
Hmm.. thought I had it figured out, but apparently not. I tried "replace mode" just choosing the Group I wanted to go in - assuming it would take out everything existing. But it didn't change it at all...

Have DEBUG turned on, but not seeing any output ( does it get logged somewhere?)
Turned DEBUG off, didn't help...
I am unsubscribing / renewing in the User Editor | Subscription tab, but it's not affecting the usergroup. (I'm expecting it would, based on the two Actions I have defined now!)

Guess I can try a two-step: "remove" followed by "Add"?? ... or maybe my conditional isn't firing?

...

Nope! Two-steps is no more effective. Maybe I need to put my conditional in quotes?
('Free Subscribers' ??)

...

Well, that didn't help. I am stumped for today :S
Last edit: 10 years 1 month ago by mikerotec.

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

Moderators: beatnantkrileon
Powered by Kunena Forum