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

After login, the only page available is "customer/account/" #3

Open
Pooofor opened this issue Jun 11, 2018 · 4 comments
Open

After login, the only page available is "customer/account/" #3

Pooofor opened this issue Jun 11, 2018 · 4 comments

Comments

@Pooofor
Copy link

Pooofor commented Jun 11, 2018

When this extension is enabled, after login, the only available page is customer/account page. I can't go to any products, all redirect to account page.

When this extension is disabled, all work fine.

@scottw-finao
Copy link

I'm running into the same issue. It will let me navigate to the desired page after being directed to the account dashboard, but it's not redirecting properly to the desired page after signing in - it always goes to the dashboard.

@scottw-finao
Copy link

scottw-finao commented Aug 1, 2018

Suggested fix:

Since you already are accessing the user session in the Helper/Data.php, add a function in there called something like 'setAfterAuthRedirect':

    public function setAfterAuthRedirect()
    {
        $_currentUrl = $this->getCurrentUrl();
        // sets current url to be the page displayed after logging in
        $this->customerSession->setBeforeAuthUrl($_currentUrl);
        // sets current url to be the page displayed after registering
        $this->customerSession->setAfterAuthUrl($_currentUrl);
    }

Then in your Model/Observer/Forcelogin.php add a call to that function the two redirect conditions.

That should store the desired url in the session and redirect the user after they properly sign in.

@mageprince
Copy link
Owner

@Pooofor and @scottw-finao Sorry for late reply. Let me try to reproduce this issue in fresh Magento installation. Also please provide live URL to check this issue.

@mageprince
Copy link
Owner

@Pooofor I have just deleted this module from Magento Marketplace due to many caching issues. And move this module to in development.

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

No branches or pull requests

3 participants