How to Identify company module is active in B2B Magento 2?

You can identify Company module status like enable/disable using programmatic way.

Native Company module has a class called Magento\Company\Api\StatusServiceInterface contains the method isActive() to check the module status. Continue reading “How to Identify company module is active in B2B Magento 2?”

Check User type is customer or guest in Rest Webapi Magento 2.

Check Current user type using programmatically with Rest Web API. It’s used when you interact with the Webapi in Magento 2.

The difference between Customer and Guest user type is resource access. Customer User type has anonymous or self permission are allowed where later one access only Resources with anonymous permission.

Magento store the constant user type value in Magento\Authorization\Model\UserContextInterface. Continue reading “Check User type is customer or guest in Rest Webapi Magento 2.”

How to identify current user type is integration in Magento 2?

Magento allows API to integrate with a third party system to the interaction between Magento and other platforms.

In Magento, a list of resources that you can access depends on your user type. There are four types of user types available in native out of the box.

List of User types in Magento:
INTEGRATION
ADMIN
CUSTOMER
GUEST Continue reading “How to identify current user type is integration in Magento 2?”