예제 #1
0
파일: User.php 프로젝트: hukumonline/idh
 protected function _postDelete()
 {
     $tblUserDetail = new Kutu_Core_Orm_Table_UserDetail();
     $rowsetUserDetail = $tblUserDetail->fetchAll("uid='{$this->guid}'");
     foreach ($rowsetUserDetail as $row) {
         // delete
         $row->delete();
     }
     //delete from table KutuUserInvoice
     $tblInvoice = new Kutu_Core_Orm_Table_Invoice();
     $tblInvoice->delete("uid='{$this->kopel}'");
     //delete from table KutuUserAccessLog
     $tblUserLog = new Kutu_Core_Orm_Table_UserLog();
     $tblUserLog->delete("user_id='{$this->guid}'");
     //delete from ACL
     $aclMan = new Kutu_Acl_Adapter_Local();
     $aclMan->deleteUser($this->username);
     // delete physical user folder define by guid
     $sDir = KUTU_ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $this->guid;
     try {
         $this->removeRessource($sDir);
     } catch (Exception $e) {
         throw new Exception($e);
     }
 }