In LoginPost controller using this "Magento\Customer\Model\Session" session. After Login I need to add a custom array to the current customer session. how can i add a custom data to magento customer session? please help me with your valuable answer.
Magento 2 – How to Add Custom Data to Customer Session
customer-sessionmagento2
Best Answer
You need to create customer_login event observer for set value in customer session after login
1) Create events.xml
2) After this file, you need to create your observer file
Now run this commands: