From 14bda09369083d7ae2430e0fc4986db863eae47d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 5 Aug 2012 14:11:28 +0200 Subject: [PATCH] Removed deprecated not used method --- htdocs/core/class/ldap.class.php | 45 -------------------------------- 1 file changed, 45 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 203a10f8aca..35da1b90beb 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -135,51 +135,6 @@ class Ldap // Connection handling methods ------------------------------------------- - /** - * Connects to the server. Just creates a connection which is used - * in all later access to the LDAP server. If it can't connect and bind - * anonymously, it creates an error code of -1. Returns true if connected, - * false if failed. Takes an array of possible servers - if one doesn't work, - * it tries the next and so on. - * - * @return void - * @deprecated Utiliser connect_bind a la place - */ - function connect() - { - foreach ($this->server as $key => $host) - { - if (preg_match('/^ldap/',$host)) - { - $this->connection = ldap_connect($host); - } - else - { - $this->connection = ldap_connect($host,$this->serverPort); - } - if ($this->connection) - { - $this->setVersion(); - if ($this->serverType == "activedirectory") - { - $this->setReferrals(); - return true; - } - else - { - // Connected, now try binding anonymously - $this->result=@ldap_bind($this->connection); - } - return true; - } - } - - $this->ldapErrorCode = -1; - $this->ldapErrorText = "Unable to connect to any server"; - return false; - } - - /** * Connect and bind * Use this->server, this->serverPort, this->ldapProtocolVersion, this->serverType, this->searchUser, this->searchPassword -- GitLab