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

Lazily get user context if we should be able to #152

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

indykoning
Copy link
Member

Summary

Fixes: #79 (comment)

In some cases the user may be logged out because we inject the UserContextInterface before Magento has had the chance to populate it.

Result

With this change we check wether the area code can be fetched, and if it is an area code where user context might be available.
And only then inject the userContext so. This should ensure user context is already compiled and added.

Checklist

  • I've ran composer run codestyle
  • I've ran composer run phpstan

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.

I can't login admin panel
3 participants