during registration I pre-fill a hidden profile field with a value and based on the value I want to redirect the URL after the first login. I am using the AutoActions plugin as it is very convenient to attach some code to the events.
My questions:
Is there an event that I can use to run some PHP/JS/HTML code to redirect after first login? I see 'OnBeforeFirstLogin' but I assume redirecting here will cancel the login.
If I have to use 'OnAfterLogin', how do I determine if the was the first login?
There's no onAfterFirstLogin, but I've added one for next CB 2.0 release. For now there's only onAfterLogin. Generally the way it's done right now is you have a checkbox field that isn't shown on profile to determine if it's first login or not. You'd check if it's value is equal to 0. If it is then it's first login. You then have a Field action that does the same check and if it is you set its value to 1. This way the checkbox will be set to 1 if first login so the actions won't fire again on next login. It's not a very good way to have to do it, but until next CB 2.0 release there's no onAfterFirstLogin.
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.
When it's done. We do not provide release dates, sorry.
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.