Skip to Content Skip to Menu

Another redirect on login question

  • kdave321
  • kdave321
  • OFFLINE
  • Posts: 189
  • Thanks: 24
  • Karma: 1
1 year 3 weeks ago #335242 by kdave321
Another redirect on login question was created by kdave321
I read the thread in " back to the article after login " and I have a similar problem.  I want an Event Invitation email link to send them to the Event after login.

Every link that requires the user be logged in I redirect to our frontpage.  Their only option at that point is to log in with our Mobile Bar extension.  The CB Login extension runs on every page once logged in.

Mobile Bar claims CB Integration but I don't know exactly how it logs in. It has a redirect on logn option which I turned off.  I have tried appending a "return=[encoded url]" argument to the frontpage URL and it ignores that.

Any ideas?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 3 weeks ago #335245 by krileon
Replied by krileon on topic Another redirect on login question
Ensure your CB Login Module has its login redirect parameter empty. If you're using a 3rd party login module then there's nothing I can suggest. CBs login process is exclusively looking for &return=BASE64ENCODED_URL_HERE as is standard Joomla implementation. It will also fallback to checking the POST data for the return 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.

  • kdave321
  • kdave321
  • OFFLINE
  • Posts: 189
  • Thanks: 24
  • Karma: 1
1 year 3 weeks ago #335246 by kdave321
Replied by kdave321 on topic Another redirect on login question
OK, Mobile Bar appears to be doing 'index.php?option=com_users&task=user.login' which is just the Joomla login, right?

It's also doing this (POST on Submit):
Code:
<input type="hidden" name="return" value="<?php echo $return; ?>" />
, but $return is simply the page I logged in with, which includes my own base64 encoded return argument... 
If I force $return there to my own return Arg, it just ignores it. So I see /components/com_users/models/login.php handling $return and can't tell why it's ignored.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 3 weeks ago #335247 by krileon
Replied by krileon on topic Another redirect on login question
Yes, that's Joomla's login page. Then it's likely CBs system plugin is taking over and redirecting to CBs login page causing the return URL to be lost. You need to use CBs login module. I cannot guarantee return redirects will work correctly with other modules.


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.

  • kdave321
  • kdave321
  • OFFLINE
  • Posts: 189
  • Thanks: 24
  • Karma: 1
1 year 2 weeks ago - 1 year 2 weeks ago #335317 by kdave321
Replied by kdave321 on topic Another redirect on login question
I have finally fixed this, after many hours of debugging.  I will post just a few details how, in case anyone else is interested.

On our site, (modified) SiteApplication.php redirects whoever is not logged in to:
\JRoute::_('index.php?option=com_users&view=login', false);
( the url returned is "/cb-login ), and that page is our Frontgate ( "/" )

I modified that to include a return value with the url of the page it was redirecting from.

Then I noticed JF Mobile Bar's idea of "$return" was whatever page you were on when you logged in ( always "/" for me). So I modified "/modules/mod_jf_mobilebar/mod_jf_mobilebar.php" to test for a return value in the current url. If so, sets $return to that, and if none go to our homepage (the default "redirect on login"). 

Basically, a penultimate return.
Last edit: 1 year 2 weeks ago by kdave321.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum