/** * @param int $id[optional] = null * @return bool */ function DeleteAccount($id = null) { $result = true; if ($id > 0) { $account =& $this->DbStorage->SelectAccountData($id); } else { $account =& $this->_account; } if ($account) { $result &= $this->DbStorage->DeleteAccountData($account->Id, $account->Email); $fs = new FileSystem(WM_INI_DIR . '/mail', $account->Email, $account->Id); $fs->DeleteAccountDirs(); $fs2 = new FileSystem(WM_INI_DIR . '/temp', $account->Email, $account->Id); $fs2->DeleteAccountDirs(); unset($fs, $fs2); } else { $result = false; } return $result; }