Share
Magento\Customer\Model\Config\Share
What it does
This class manages customer account sharing configuration in Magento 2, determining whether customer accounts are shared globally across all websites or isolated per website.
Developers use this class to check the current sharing scope, validate configuration changes (preventing duplicate emails in global scope), and retrieve which websites share customer data.
It's essential when implementing multi-store functionality that involves customer account management.
Public Methods
- isGlobalScope()
- isWebsiteScope()
- toOptionArray()
- beforeSave()
- getSharedWebsiteIds()