Download & Extend

Keep already set destination variable

Project:Redirect 403 to User Login
Version:6.x-1.2
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

First I must say that I love this module and I think that this sort of functionality should be in core.

I have one feature request. When a path already has the destination set, the redirect fails.
Example:

- I browse to node/add/description?productid=20&destination=product/music/product_to_describe
- Instead of an access denied, your module sends me to user/login?destination=node/add/description
- I login and then it brings me to node/add/description (productid is unknown)

Or, another use case:
- I browse to node/add/hotel?destination=hotels
- Instead of an access denied, your module sends me to user/login?destination=node/add/hotel
- I login and then it brings me to node/add/hotel
- After submitting, I am send back to the homepage instead of 'hotels'

Would it be possible to detect if there already is a destination variable and if so, rename it to destination2 in between?

Comments

#1

I'm not so sure that's a problem with this module as much as it is a deficit in the Drupal destination redirect APIs to nest destinations. I take it that you feel like this module should make a workaround for that?

#2

Well, this is the only use case I can think of that uses nested destinations. It can happen that you already have a destination but need to login first. If it is possible to get this in the module, that would be awesome of course :)

#3

It seems ideal to me to at least populate the destination value onto the user registration link, if it is present, so that the user can recover and maintain the intended workflow either by logging in or by registering for a new account.

nobody click here