server/ldaputils.py
branchstable
changeset 8638 9f95c2368b8b
parent 8586 bc74608d2003
child 8674 001c1592060a
child 8680 2bb3021f4ffe
--- a/server/ldaputils.py	Tue Dec 18 11:40:51 2012 +0100
+++ b/server/ldaputils.py	Tue Jan 08 15:53:22 2013 +0100
@@ -222,19 +222,6 @@
             raise AuthenticationError()
         return eid
 
-    def object_exists_in_ldap(self, dn):
-        cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx
-        if cnx is None:
-            self.warning('Could not establish connexion with LDAP server, assuming dn %s exists', dn)
-            return True # ldap unreachable, let's not touch it
-        try:
-            cnx.search_s(dn, self.user_base_scope)
-        except ldap.PARTIAL_RESULTS:
-            self.warning('PARTIAL RESULTS for dn %s', dn)
-        except ldap.NO_SUCH_OBJECT:
-            return False
-        return True
-
     def _connect(self, user=None, userpwd=None):
         protocol, hostport = self.connection_info()
         self.info('connecting %s://%s as %s', protocol, hostport,