What is the equivalent of this code in magento 2?
Mage::getModel('customer/customer')->loadByEmail();
Please use this code:
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customer = $objectManager->get('Magento\Customer\Model\Customer');
$customer->setWebsiteId('1');
$customer->loadByEmail('[email protected]');
?>