Skip to Content Skip to Menu

What is best way to use CB Auto Actions for logging user into site after registration when using CB Subs?

10 years 7 months ago #243410 by prestoproducts
As noted in previous message here:

www.joomlapolis.com/forum/153-professional-member-support/185909-solved-automatic-login-after-registration#243374

I am using CB Subs in registration. In the reply it is noted that the built in login/logout action will not behave well when CBSubs is involved. Since we are using CBSubs as a requirement for registration, how can we best log the user in after they have completed the CBSubs registration process?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #243423 by krileon
That's really tricky to do. The issue will be the order of execution. You could move CB Auto Actions to be ordered after CBSubs in CB > Plugin Management. This ensure CBSubs is loaded first and its triggers will fire and behave first. Next you can try the below action and see if it'll accomplish your needs, but you need to be careful as it could interrupt CBSubs integrations.

Type: Login/Logout
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A
Method: Username
Username: [username]

Replace PLAN_ID_HERE with the id of the plan to fire the action on. You could also remove this and it'd just fire on any plan becoming active.


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.

10 years 7 months ago #243433 by prestoproducts
Thank you for the timely reply but I have attempted this and it is not functioning for my configuration. Can you please review my trigger and advise if it is off?



As you can see in this screenshot, CB Auto Actions is ordered below CB Paid Subscriptions:



I am running several other triggers throughout the site, so from here I plan on testing a few order variations on those. Any other suggestions?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #243437 by krileon
Try the below usage.

Method: Username
Username: [username]

If still not working it may not be possible as CBSubs is still somewhat in the middle of processing integrations, 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.

10 years 7 months ago #243472 by prestoproducts
I attempted the username values and is still did not work.

Well if this is not going to function now, please let me know if this ever becomes possible in future releases.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #243491 by krileon
It's possible using the after registration trigger if you're not using CBSubs, but for this to work with CBSubs you'll need to wait for a future release where a new trigger could be added to fire after the entire subscription process is done, but even then that's risk as the process could be from an IPN and have nothing to do with user integration. Something we'll need to investigate for a later release.


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: prestoproducts

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

Moderators: beatnantkrileon
Powered by Kunena Forum