We're using Loggintoboggan with the option to show a user login form when a user hits an Access Denied page. We've found that when the path accessed contains a query string, that query string is not maintained in the redirect after a successful login.

eg. User hits a protected page when not logged in, gets the access denied page along with the user login form, at the following URL:

e-legal/events?date=2012-10

On successful login, the user is redirected to:

e-legal/events

As you can perhaps glean from the URL, this page is a view and without the query string, shows something very different from what was intended. Any idea why this is the case?

I confess it may not be a logintoboggan issue, but I'm starting here, looking for any help.

Comments

steveparks’s picture

Status: Active » Closed (works as designed)

I've looked into this to see what would be involved in supporting the query string being passed along the chain through login.

However, it's not really going to be practical. If you look at the form_alter code for the user login page, and particularly line 373 in logintoboggan.module:

         $form['logintoboggan_login_link'] = array(
            '#markup' => l(theme('lt_login_link'), 'user/login', array('query' => drupal_get_destination())),
          );

You'll see that the destination is already being passed as a query string, so it would be tricky to then pass another query string through that process so that it is interpreted correctly at the other end.

I'm sorry that this isn't a more useful answer for you. In your case perhaps you could set up some defaults on the view?

For now I'm closing this ticket as there's not really anything we can do with LoginToboggan.