Default Password and Redirect

11 months 1 week ago #333873 by PaceOnline
Replied by PaceOnline on topic Default Password and Redirect
That is the welcome email. I have disabled both email confirmation and admin approval.

Please Log in to join the conversation.

11 months 1 week ago - 11 months 1 week ago #333875 by PaceOnline
Replied by PaceOnline on topic Default Password and Redirect
I have changed to have users enter their passwords at registration and created the auto action onAfterNewUser and onAfterUserRegistration as recommended. I have a code action that stores the hashed password as cb_spook.
PHP{
$variables['var1']->set( 'cb_spook', sha1([password]));
}
with reference var1

This doesn't seem to work at all. I can't figure out the issue.

Please Log in to join the conversation.

11 months 1 week ago #333877 by PaceOnline
Replied by PaceOnline on topic Default Password and Redirect
After setting users to enter their own passwords, removing the variable and switching to a Query auto action I have managed to get the password sync working. How do I auto login and then redirect after the user completes sign up of the CB Subs plan instead of showing the thank you page.

Please Log in to join the conversation.

11 months 1 week ago #333880 by krileon
Replied by krileon on topic Default Password and Redirect

with reference var1

This doesn't seem to work at all. I can't figure out the issue.

That's not how setting reference variables works. You must first specify which variable is a reference under the Parameters tab. You then access it using the below format.
$variables['var#']

So in this case it would be the following.
$variables['var1']->set( 'cb_spook', 'value_here' );

How do I auto login and then redirect after the user completes sign up of the CB Subs plan instead of showing the thank you page.

There isn't a trigger available for the CBSubs thank you page so that's not really possible without risking interrupting other CBSubs processes. onCPayDisplayBasketResult would be the trigger to use. You'd need to check that the basket is completed. Example as follows.

Global
Triggers: onCPayDisplayBasketResult
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var1_payment_status]
Operator: Equal To
Value: Completed

var1 for this trigger is the payment basket object itself. It'll contain all the data that the _cbsubs_payment_baskets has. To try and log the user in during this you can try the following.

Global
Triggers: onCPayDisplayBasketResult
Type: Login / Logout
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var1_payment_status]
Operator: Equal To
Value: Completed
Action
Mode: Login
Method: User ID


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn