From 7a855bfd7ebadda78cc535ec8dbbc8555b59437b Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Sat, 11 Nov 2000 15:30:37 +0000 Subject: [PATCH] I hope i did not break too much. ldap-support should now be mostly complette. Some things are still to do. --- admin/inc/accounts_ldap.inc.php | 12 +++++++++++- preferences/settings.php | 18 +++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/admin/inc/accounts_ldap.inc.php b/admin/inc/accounts_ldap.inc.php index 4da06580d9..e48e70ac8e 100644 --- a/admin/inc/accounts_ldap.inc.php +++ b/admin/inc/accounts_ldap.inc.php @@ -273,8 +273,18 @@ { global $phpgw_info, $phpgw, $ldap; - #ldap_delete($ldap,"appl=email, ou=phpgwpreferences,".$account_id); #ldap_delete($ldap,"ou=phpgwpreferences,".$account_id); + + //delete sub dn's + $sri = ldap_search($ldap, $phpgw_info["server"]["ldap_context"], "objectclass=phpgw_*"); + $allValues = ldap_get_entries($ldap, $sri); + + for ($i=0; $i < $allValues["count"]; $i++) + { + #print "
delete".$allValues[$i]["dn"]; + ldap_delete($ldap,$allValues[$i]["dn"]); + #print ldap_error($ldap); + } ldap_delete($ldap,$account_id); } diff --git a/preferences/settings.php b/preferences/settings.php index 005290cc55..c9c6ecfb4d 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -155,24 +155,24 @@ common->preferences_delete("byappnotheme",$phpgw_info["user"]["account_id"],"common"); + $phpgw->preferences->preferences_delete("byappnotheme",$phpgw_info["user"]["account_id"],"common"); $phpgw->db->lock("preferences"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"maxmatchs","common"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"tz_offset","common"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"dateformat","common"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"timeformat","common"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"lang","common"); - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"default_app","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"maxmatchs","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"tz_offset","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"dateformat","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"timeformat","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"lang","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"default_app","common"); if ($navbar_text) { - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"navbar_text","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"navbar_text","common"); } if ($phpgw_info["user"]["apps"]["admin"]) { if ($show_currentusers) { - $phpgw->common->preferences_add($phpgw_info["user"]["account_id"],"show_currentusers","common"); + $phpgw->preferences->preferences_add($phpgw_info["user"]["account_id"],"show_currentusers","common"); } }