Closed (outdated)
Project:
Masquerade
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2012 at 17:57 UTC
Updated:
17 Apr 2026 at 11:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jrreid commentedHere is my proposed patch, rolled against head
Comment #2
andypostSuppose this way wrong, simply you just need to hijack global referer in you custom module, I see no actual reason to store another variable in session
Also your code does not follow http://drupal.org/coding-standards
Comment #3
deekayen commenteddestination is the traditional drupal get variable for setting redirects. there's already some built-in core support for that var.
Comment #4
jrreid commented?destination=blah however influences where you go when you click on a masquerade link, in this case sending the masqueraded user to blah after the switch and already works as expected. This return url setting is to control where you go back to after you've clicked switch back.
Comment #5
andypostSuppose storing of return url in session makes no sense. But allow to handle common 'destination' a thing we should done.
Comment #6
andypostHere's a patch:
- adds destination to all links
- form submission does not need got at all
- switch callbacks analyzes 'destination' parameter first
Comment #7
andypost@deekayen are you agree to commit this?
This hunk are required to fix
Comment #8
obleser commentedThought it would be a better approach to create 2 "Triggers" which are triggered on switch and unswitch?
Then it would be possible to do a hole bunch if things, not only a redirect ;)
Just a thought...
Comment #10
jenlamptonI second the approach in #8. I just recommended the same thing over in https://drupal.org/node/763972#comment-8266267
Comment #11
ressaThanks for working on this. In an attempt to help the maintainers, I am going through some of the Drupal 7 issues, and closing them, since Drupal 7 is EOL.
Maintainers should grant credit for the great work to the relevant users, even if the patch did not get committed: https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett....
Since Drupal 7 is EOL, we can probably close this issue.
But feel free to re-open if this is still relevant, and we should consider adding this to the Drupal 11 version?