Access across different CB sites

1 month 6 days ago - 1 month 6 days ago #313258 by micheleq
Hi Kyle,
I am using the CB Login module. I have 2 auto actions and I've switched them from subscribe to unsubscribe, and the unsubscribe continued to work while the subscribe continued to not work. So that ruled out anything in the setting of the Auto Action instance itself.
This makes me think that a user on logging in, who doesn't have a membership, one of the processes exits the chain of actions and so the Auto Action is prevented from getting triggered.
Does this make sense?
That being the case, I'd have to figure out a different trigger event.
Thanks.

To be clear, this is what I'm trying to achieve:
  • An existing user without a membership
  • A CB Query Field returning 1 or 0
  • On login, an Auto Action signs the user up to a membership plan if Query returns 1.
I can't get that to work.
1 month 6 days ago - 1 month 6 days ago #313264 by krileon

This makes me think that a user on logging in, who doesn't have a membership, one of the processes exits the chain of actions and so the Auto Action is prevented from getting triggered.

Only way that could happen is if the user object was modified and lost its user id or the previous auto action caused a redirect.

To be clear, this is what I'm trying to achieve:

An existing user without a membership
A CB Query Field returning 1 or 0
On login, an Auto Action signs the user up to a membership plan if Query returns 1.

The below should work perfectly fine.

Global
Triggers: onAfterLogin
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Conditions
QUERY_FIELD Equal To 1
Action
Mode: Subscribe
Plans: YOUR_PLANS

If it's not working enabled debug mode under Parameters then enable debug mode and maximum error reporting in Joomla global configuration. This should cause it to output a Joomla message queue message about what failed if something failed, which is usually the condition as your query field may not be outputting as expected or it may not be as accessible as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
1 month 5 days ago #313275 by micheleq
Here are the results of my debug test, before these tests:
- All other custom Auto Actions were disabled
- Cleared Cache (server and browser)
- When executing the logins, the conditions were set for the active Auto Action to execute

These are the results of the login when the Unsubscribe Auto Action was enabled (only one enabled) and the user was set to be Unsubscribed from the plan
Warning: Spoiler! [ Click to expand ]

Result: The user was unsubscribed (as it should) and redirected to the home page without a message and logged out.



These are the results of the login when the Subscribe Auto Action was enabled (only one enabled) and the user was set to be Subscribed to the plan

Warning: Spoiler! [ Click to expand ]


Result: Nothing different. Notice "A membership is needed for access." Should have subscribe the user and logged in, but didn't.

I tried with subscriptions that were available in the front end.


Thanks,
Tomas
1 month 5 days ago #313283 by krileon
"A membership is needed for access" is the access denied message CBSubs displays when it blocks access to something. Are you protecting the entire CB component with CBSubs? Do not do this. It will prevent all access to CB. The access denied redirect is happening before your auto action and is why it isn't working.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
Moderators: beatnantkrileon
Time to create page: 0.381 seconds
Facebook Twitter Google LinkedIn