Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Trigger for after first user login, exists?

11 years 5 months ago - 11 years 5 months ago #226920 by deltafidesign
I need a trigger to redirect user after first user login. I need an auto-action 'cause I use another auto-action for normal user login so if I set it into CB registration option this is bypassed by this other auto-action. I thought that using another auto-action with onAfterUserFirstLogin (if exists...) could do the trick but I cannot find such trigger.

What can I do?
Last edit: 11 years 5 months ago by deltafidesign. Reason: Solved

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226923 by krileon
Replied by krileon on topic Trigger for after first user login, exists?
There's no after first login. Only before first login (onBeforeFirstLogin). Doing redirect here though will probably interrupt the login process. I suggest using the first login redirect parameter within CB > Configuration > Registration.


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.

11 years 5 months ago #226927 by deltafidesign
Replied by deltafidesign on topic Trigger for after first user login, exists?

krileon wrote: I suggest using the first login redirect parameter within CB > Configuration > Registration.


It doesn't work, 'cause I use another auto-action for user login that redirect to a specific page. So it seems that this auto action overrides the CB > Configuration > Registration redirect parameter.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226930 by krileon
Replied by krileon on topic Trigger for after first user login, exists?
The after login trigger always fires. So if you redirect on it then yes it'll override first login redirect URL.


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.

11 years 5 months ago #226932 by deltafidesign
Replied by deltafidesign on topic Trigger for after first user login, exists?
Ok, so is there a solution for my case?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226934 by krileon
Replied by krileon on topic Trigger for after first user login, exists?
Believe you can use the after login trigger and check that lastvisitDate is equal to 0000-00-00 00:00:00 and if it is then that's the first time the user has logged in. It does get updated before the after login trigger, but only in database and not in user object so you should be able to use [var1_lastvisitDate] or [lastvisitDate] in your conditional.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum