I am Batman

This commit is contained in:
Kload 2013-11-28 17:16:18 +01:00
parent 7d6722511f
commit b3702f5dee

View file

@ -269,7 +269,7 @@ class YunoHostLDAP(Singleton):
if anonymous:
self.conn.simple_bind_s()
self.connected = True
elif self.connected:
elif self.connected and not password:
pass
else:
if password:
@ -316,6 +316,8 @@ class YunoHostLDAP(Singleton):
"""
try:
self.connected = False
self.pwd = False
self.conn.unbind_s()
except:
raise YunoHostError(169, _('An error occured during disconnection'))