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
Login user programmatically showing wrong default header message "Default welcome msg!" instead of showing "Welcome, user!" #19214
Comments
Hi @kalpeshhiran. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @kalpeshhiran do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @orlangur. Thank you for working on this issue.
|
@kalpeshhiran, GitHub is intended for bug reports, please use Magento Stack Exchange for questions on how particular customization can be implemented. Note that welcome message is displayed using https://devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/page-caching/private-content.html, so, after login corresponding section needs to be invalidated. |
@orlangur I assume this is a bug and I am not asking for any customization. When someone login to Magento 2.2.6 either with login form or login function provided by Magento setCustomerAsLoggedIn, behaviour should be same. I am looking to see just default msg which is shown after user login (includes fullname), and not really looking to customize anything. I will appreciate if anyone can help with that. |
@kalpeshhiran no, please check the documentation I referenced. I suppose in the latter case private data section is not invalidated properly thus you see old data. |
Description
When you login to Magento 2.2.6 programmatically with code below, header show default message "Default welcome msg!" instead of "Welcome, user!"
// Load customer session
$customerSession = $objectManager->create('Magento\Customer\Model\Session');
$customerSession->setCustomerAsLoggedIn($customer);
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: