Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
customer_rollback.php
Go to the documentation of this file.
1 <?php
8 
11 $registry->unregister('isSecureArea');
12 $registry->register('isSecureArea', true);
13 
16  \Magento\Customer\Model\Customer::class
17 );
18 $customer->load(1);
19 if ($customer->getId()) {
20  $customer->delete();
21 }
22 
23 $registry->unregister('isSecureArea');
24 $registry->register('isSecureArea', false);
25 
26 /* Unlock account if it was locked for tokens retrieval */
29 $throttler->resetAuthenticationFailuresCount('[email protected]', RequestThrottler::USER_TYPE_CUSTOMER);