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);
Expected result
- Session should get started
- Header should show "Welcome, user!"
Actual result
- Session getting started
- Header shows "Default welcome msg!"
Unlike when you login with magento login page, it is not picking customer fullname during login with code.