From f5ae84848e22e99ae15cd7eb4c770856f78b81b1 Mon Sep 17 00:00:00 2001 From: opensides Date: Tue, 15 Jun 2004 21:59:40 +0000 Subject: [PATCH] correction d'une erreur dans dolibarr_ldap_unbind --- htdocs/lib/ldap.lib.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/htdocs/lib/ldap.lib.php b/htdocs/lib/ldap.lib.php index 7d74e12b2b9..316b87ba077 100644 --- a/htdocs/lib/ldap.lib.php +++ b/htdocs/lib/ldap.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Benoit Mortier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,14 +36,36 @@ Function dolibarr_ldap_bind($ds) { $ldapbind = ldap_bind($ds, LDAP_SERVER_DN, LDAP_SERVER_PASS); } -/* else - { - $ldapbind = ldap_bind($ds, $dn); -- connection anonyme desactivee - } -*/ + return $ldapbind; } + +Function dolibarr_ldap_unbind($ds) +{ + + $ldapunbind = ldap_unbind($ds); + + return $ldapunbind; +} + + +Function dolibarr_ldap_getversion($ds) +{ + ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version); + + return $version; +} + + +Function dolibarr_ldap_setversion($ds,$version) +{ + $ldapsetversion = ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version) + + return $ldapsetversion; +} + + Function ldap_unacc($str) { $stu = ereg_replace("é","e",$str);