Log in
Model

CustomerRepository

Magento\Customer\Model\ResourceModel\CustomerRepository

What it does

This is the main repository class for managing customer data in Magento 2.

Developers use it to perform CRUD operations on customers - creating new customers, retrieving customer data by ID or email, searching for customers with filters, and deleting customers.

It handles data validation, password management, customer addresses, and triggers events for custom business logic.

Public Methods

  • save()
  • get()
  • getById()
  • getList()
  • delete()
  • deleteById()