Download & Extend

make destination path work optionally

Project:Login Destination
Version:6.x-2.3
Component:Miscellaneous
Category:task
Priority:normal
Assigned:setfree
Status:closed (fixed)
Issue tags:ToDo

Issue Summary

Now when you check “Preserve destination” only this option will work. So whatever you choose for your Static URL of PHP snippet (in URL destination settings) will not work. And the other way around, if “Preserve destination” is not checked only the Static URL or PHP snippet will work.

I would like very much that the Static URL or PHP snippet would work as default but when I add ‘destination=example/path’ to my path, the destination will be example/path and not the Static URL or PHP snippet.

Could that be a clever option? Or a stupid request? ;-)

Comments

#1

Category:feature request» bug report

This, to me, is a bug unless I'm completely missing the point of the login redirect module.

For example, if a user logs in from "user/login", that would suggest to me that they're just wanting in to the site so I'd want to redirect them to the dashboard I've created since it's intended to be their internal homepage. However, if they were trying to access the internal forum ("internal/forum"), that's where they should go upon login.

When I turn on "Preserve destination", login from "user/login", it redirects to the user's profile page and that's it.

#2

I've written up a blog entry on how I got Login Destination to use the user's destination if it's there or redirect to your default destination if not.

http://www.interworksinc.com/blogs/scorrales/2009/07/23/taking-control-y...

#3

todo

#4

will be taken care of into the 2.6 release.

#5

Status:active» postponed

#6

Status:postponed» active

I finally have some good idea of what works how.

The proposal above is good.

This module's main purpose is to stand in the middle, to plug itself between drupal core and the end user.

So it will be best to organise the UI in such a way that you have complete freedom of choice.

In the last 2.6 release there is a way to uncheck the destination-related part and use only php-mode for redirection. Then from within PHP-mode one can access the destination property and optionally use it (too trickily via the drupal_get_destination() func which I currently do not mention in the docs / UI). The UX is poor for non-programmers and this is what will come out right soon in the 2.7 release.

There will be a simpler way to do this - everything now is in place for it to happen.

In the background:
I am thinking about a simple enough ini-style language for redirection:

like this quote from our emails with hummonk (maintainer of LT )

(see the [dest] pseudo-var in here - means destination )

Let me propose an addition to the redirect-protocol we're inventing here:

- a textarea with many lines for redirection rules
- each rule on one line
- all lines begining with # are comments
- each rule consists of 3 parts:

role : path_before > path_after

- * acts as a wildcard (in the regexp sense) (even for roles )
- ! acts as a negation (=NOT)

- I see some possible problems when one user has many roles - I propose that we make the system "first matched is last matched - users beware"

examples:
#
# all roles go to a static url
* : user/login : node/5

# role admin : always : go to "destination=whatever"
administrator : * : [dest]

# default catch rule
* : * : admin

This should cover all normal use-cases and will be simple enough for all ? php we leave as an advanced feature

#7

Category:bug report» task

#8

Assigned to:Anonymous» setfree
Status:active» fixed

Fixed in the dev version. If preserve destination is checked it will only fire if there is a destination in the URL, if not, normal logic will continue.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here