Log in
Model

GroupManagement

Magento\Customer\Model\GroupManagement

What it does

This class manages customer groups in Magento 2, providing methods to retrieve and validate groups like default, logged-in, not-logged-in, and all-customers groups.

Developers use it to get customer group information for pricing rules, catalog permissions, or determining group-specific functionality.

It also checks if a group is readonly (system-protected) to prevent accidental modifications.

Public Methods

  • isReadonly()
  • getDefaultGroup()
  • getNotLoggedInGroup()
  • getLoggedInGroups()
  • getAllCustomersGroup()