Hi,
I tried redirecting from the user login block but redirection does not work, it only works from user/login
For Exmaple :
localhost/drupal/user/login?test=https://www.google.co.in/?gws_rd=ssl is working but
localhost/drupal/?url=https://www.google.co.in/?gws_rd=ssl(after entring this URL on the page trying to login from block) not working.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | login_form.patch | 2.92 KB | aditya_anurag |
Comments
Comment #2
aditya_anurag commentedComment #3
aditya_anurag commentedHi,
I checked the issue, Drupal login block don't all user to redirect to external link so it wasn't redirecting. I created a patch try applying that it will work.
Comment #4
aditya_anurag commentedComment #5
aditya_anurag commentedComment #7
aditya_anurag commentedComment #8
jweowu commentedI think it's better to define the individual hook_form_FORM_ID_alter functions, and have each of them call a common helper function. That prevents the unnecessary call to a hook_form_alter implementation for ALL forms.
(But if you *did* keep using hook_form_alter, I would suggest inverting the form_id test and bailing out early when it doesn't match, which avoids nesting the entire function body.)
Comment #9
GeeUnit commentedI am facing the same issue. I am trying to navigate the user to an external URL on login which works for /user/login?url=https://www.google.co.in/?gws_rd=ssl but doesn't work from the user login block.
I applied the patch mentioned in #4 but that did not fix the problem (user/login?url=https://www.google.co.in/?gws_rd=ssl stopped working too)