Closed (fixed)
Project:
Redirect 403 to User Login
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2012 at 21:58 UTC
Updated:
19 Jun 2018 at 09:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
denes.szabo commentedI made a patch with this feature, attached.
Comment #3
lotyrin commentedComment #4
lotyrin commentedActually, 8.x branch was opened, lets make sure this lands there.
Comment #5
jkamizato commentedGuys,
follow the patch for Drupal 8.
I implemented the hook_user_login the redirect aflter login.
Comment #6
jkamizato commentedComment #7
jkamizato commentedFixed patch
Comment #8
jkamizato commentedCorrect file
Comment #9
jkamizato commentedThe new version.
From 8.x-1.x
Comment #10
jkamizato commentedNew version.
Esse class not found fixed
Comment #11
jkamizato commentedComment #12
jkamizato commentedVersion more clean
Comment #13
Fidelix commentedI reviewed the patch and here are some improvements you could do if this method goes through:
parse_str will fail on null values, and that's a perfectly valid return value for getQueryString().
You could use \Drupal::request()->get() or \Drupal::request()->query->get() instead as it's easier to handle and always works.
This way of solving this problem is also weird, seems like a partial fix on top of a partial fix.
You should probably be solving this on r4032login_redirect() - which apparently is not doing what it's supposed to.
Most likely because the code was not re-evaluated during the D8 port.
Comment #14
jkamizato commented@fidelix
I changed the way of resolving this. Now, in the onKernelException method, I verify if its possible to convert the destination from absolute to relative
Comment #15
jkamizato commentedComment #17
nixou commentedSince the patch was actually obsolete (edited 2 years ago), I rewrote it to match the current code.
It's now committed so the module support now external url.
Thanks.