Skip to Content Skip to Menu

Redirect logged in user attempting to access registration page

5 years 1 month ago #314793 by mikeprince
If a logged in user attempts to access the registration page, e.g. via direct URL, they get the error 'You are already logged in'. Is it possible instead to redirect them automatically, say to the home page?

I have a login module on every page and I don't use redirect after login because I want the user to remain on the same page. Hence if an existing non-logged in user accesses the registration page and logs in from there, they should get redirected after login. Otherwise they will get the 'You are already logged in' error.

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 1 month ago #314798 by krileon
That's doable using CB Auto Actions and a Redirect action on the onBeforeRegisterFormRequest trigger, but aside from that no.


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.

5 years 1 month ago #314804 by mikeprince
Ok. I assume the same will work if the user logs in from the lost password page? The difference here is that the lost password page won't give a 'You are already logged in' error, but it is clearly illogical to leave them on that page having successfuly logged in.

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 1 month ago #314860 by krileon
If you also act on the onLostPassForm trigger, yes.


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