Delete users in Magento frontend

If you need the possibility to let the users delete their¬†own accounts, you can use the following snippet in a corresponding controller or observer to delete users in frontend: <?php $oCustomer = $this->_getSession()->getCustomer(); if(!$oCustomer->getId()){ Mage::throwException($this->__(‘Cannot load customer!’)); } //lie to mage ūüėČ // @todo: Check, if there is a better way Mage::register(‘isSecureArea’, true); $oCustomer->delete(); $this->_getSession()->clear(); […]