Closed (fixed)
Project:
Login Destination
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2019 at 10:08 UTC
Updated:
30 Sep 2020 at 08:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
zebda commentedComment #3
pradeepjha commentedComment #4
pradeepjha commentedAfter applying attached patch, you will be able to redirect to different domain based on roles.
Steps to test:
1. For External URL:
2. Repeat same steps for internal URL.
Comment #5
pradeepjha commentedComment #6
pradeepjha commentedComment #7
nagarajan kumar commentedHi,
I have tested this patch it is working for me.
Comment #8
rsvelko commentedThanks for the patch!
I have a question:
- in the 2nd patch hunk in the function login_destination_perform_redirect() , we have:
---
179 if ($destination) {
180 // Check if it's a external URL.
181 if (UrlHelper::isExternal($destination->destination_path)) {
182 $response = new TrustedRedirectResponse($destination->destination_path);
183 $response->send();
184 }
185 $service->prepareDestination($destination);
---
... so the patch adds $response->send().
Then if the link is not external, we have $service->prepareDestination($destination);
My question, is it the right thing to call $response->send(); within login_destination_perform_redirect()
or is it better to call it from within prepareDestination() located in login_destination/src/LoginDestinationManager.php?
The added snippet of code in the hunk seems right , I wonder where is the right place to put that snipper?
I mean this snippet above - from line 181 to 184.
Comment #11
rsvelko commentedIn the end #4 looks good to me. Committing.