CustomerSessionUserContext
Magento\Customer\Model\Authorization\CustomerSessionUserContext
What it does
This class provides a way to identify and retrieve information about the currently logged-in customer through their session.
Developers use it when they need to determine the user type (customer) and get the customer ID for authorization and permission checks in Magento 2.
It implements the UserContextInterface to provide a standardized way of accessing customer identity information across the application.
Public Methods
- getUserId()
- getUserType()