Fix delete function

This commit is contained in:
Miles Lott 2001-04-26 14:09:03 +00:00
parent f5fbcfd750
commit 0abd645eff

View File

@ -99,14 +99,7 @@
global $phpgw, $phpgw_info;
$account_id = get_account_id($accountid);
$account_lid = $this->id2name($account_id);
$ds = $phpgw->common->ldapConnect();
$sri = ldap_search($ds, $phpgw_info['server']['ldap_context'], 'uid='.$account_lid);
$allValues = ldap_get_entries($ds, $sri);
if ($allValues[0]['dn']) {
$del = ldap_delete($ds, $allValues[0]['dn']);
}
$this->contacts->delete($account_id);
// Do this last since we are depending upon this record to get the account_lid above
$this->db->query('DELETE FROM phpgw_accounts WHERE account_id='.$account_id);