I'm trying to parse callback url, and matching set of params out of a url users are sent to as part of a complex user journey:

Here's the url in question:


I'm parsing the necessary bits out of this fine, if user is signed in.

My problem occurs when a user isn't signed in, because they're redirected to this url:


Then they end up at this url, without the crucial %3FrequestId%3D_ae0b3a45-c878-4033-96f2-2b2428090711 fragment:


How to I ensure I don't lose that fragment if a user isn't logged in?

Is there a relevant hook I can use before the https://mysite.org/user/login?destination process begins?

  • Three questions 1) What module provides login destination 2) what browser encodes non-ascii chars this way 3) isn't it module's or browser's issue?
    – Mołot
    Aug 23, 2013 at 17:15
  • 1) I'm not sure I understand your question, but writing a custom module, with the hook_menu entry of '/idp_sign_up'. 2) I'm seeing this behaviour in Chrome 28,and and Firefox 23. 3) I'd assume there was a hook I would use to grab this value before Drupal's redirection occurs. Aug 23, 2013 at 17:19
  • What @Mołot means by 1) is what method are you using to redirect the user to the login page if they try to access an unauthorised page? That isn't Drupal's default behaviour so there must be custom code/a module making it happen. The point at which that code performs the redirect is probably where you need to look
    – Clive
    Aug 23, 2013 at 17:28
  • @Clive There are many modules like Login Redirect and this question appeared to me to be a bugreport for one of them.
    – Mołot
    Aug 23, 2013 at 20:09
  • molotm clive: ah, it turns out this is the module in question - drupal.org/project/login_destination. Thanks for the pointer (rolls up sleeves…) Aug 23, 2013 at 23:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.