Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix #122

Closed
wants to merge 2 commits into from
Closed

Bugfix #122

wants to merge 2 commits into from

Conversation

upandfine
Copy link

Fix empty redirect to startpage on multi-website environment.

Fix empty redirect to startpage on multi-website environment.
@shochdoerfer
Copy link
Member

Thank you for you first contribution to this project. Could you elaborate a bit more which problem you fix with this PR? Is there any chance to add unit tests to cover the change?

@@ -55,11 +55,13 @@ class AfterLoginPlugin
public function __construct(
Session $session,
ScopeConfigInterface $scopeConfig,
$defaultTargetUrl
$defaultTargetUrl,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is $defaultTargetUrl still needed? If I have seen correctly you are not using the variable any more at all. Or am I missing something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I missed that.

@@ -78,7 +78,7 @@ public function afterExecute(LoginPost $customerAccountLoginController, $resultR

$targetUrl = $this->session->getAfterLoginReferer();
if (empty($targetUrl)) {
$targetUrl = $this->defaultTargetUrl;
$targetUrl =$this->redirect->getRedirectUrl();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is $this->redirect populated with the target url defined in Magento backend? Am I missing some magic here?

@shochdoerfer
Copy link
Member

@webzellentOpenSource did you see my question regarding how $this->redirect is getting populated?

@shochdoerfer
Copy link
Member

@webzellentOpenSource would #117 fix this problem as well?

@shochdoerfer
Copy link
Member

@webzellentOpenSource is this still needed with #123 being solved?

@shochdoerfer
Copy link
Member

Sadly no feedback for quite a while. Will close the PR for now.

@shochdoerfer shochdoerfer added this to the 3.1.0 milestone Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants