protected function _postDelete() { $tblUserDetail = new Pandamp_Modules_Identity_User_Model_UserDetail(); $rowsetUserDetail = $tblUserDetail->fetchAll("uid='{$this->guid}'"); foreach ($rowsetUserDetail as $row) { // delete $row->delete(); } //delete from table KutuUserInvoice $tblInvoice = new Pandamp_Modules_Payment_Invoice_Model_Invoice(); $tblInvoice->delete("uid='{$this->kopel}'"); //delete from table KutuUserAccessLog $tblUserLog = new Pandamp_Modules_Identity_Log_Model_Log(); $tblUserLog->delete("user_id='{$this->guid}'"); //delete from ACL $aclMan = Pandamp_Acl::manager(); $aclMan->deleteUser($this->username); // delete physical user folder define by guid $sDir = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $this->guid; try { $this->removeRessource($sDir); } catch (Exception $e) { throw new Exception($e); } $sDir = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'photo'; try { if (file_exists($sDir . "/" . $this->guid . ".gif")) { unlink($sDir . "/" . $this->guid . ".gif"); } if (file_exists($sDir . "/" . $this->guid . ".jpg")) { unlink($sDir . "/" . $this->guid . ".jpg"); } if (file_exists($sDir . "/" . $this->guid . ".jpeg")) { unlink($sDir . "/" . $this->guid . ".jpeg"); } if (file_exists($sDir . "/" . $this->guid . ".png")) { unlink($sDir . "/" . $this->guid . ".png"); } } catch (Exception $e) { } }