diff options
| author | ced <> | 2007-03-26 15:14:24 +0000 |
|---|---|---|
| committer | ced <> | 2007-03-26 15:14:24 +0000 |
| commit | b5bf3f6eadb9a42e843d016a315c9e433edffd5b (patch) | |
| tree | 8d6f99b91e5cdbf0f4ee9617e0e56447f088b540 /addons/users_ldap | |
| parent | 8263fe39c531839fc04c26ffd07978a6c2743642 (diff) | |
USERS_LDAP: add ldap unbind
bzr revid: ced-15fe19fbe0c070da5a32b5f742788266add14ab5
Diffstat (limited to 'addons/users_ldap')
| -rw-r--r-- | addons/users_ldap/users_ldap.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/users_ldap/users_ldap.py b/addons/users_ldap/users_ldap.py index 9d6eb960c0c..8126c3bd3e4 100644 --- a/addons/users_ldap/users_ldap.py +++ b/addons/users_ldap/users_ldap.py @@ -76,6 +76,7 @@ def ldap_login(oldfnc): dn=result_data[0][0] name=result_data[0][1]['cn'][0] if l.bind(dn, passwd): + l.unbind() cr.execute("select id from res_users where login=%s",(login.encode('utf-8'),)) res = cr.fetchone() if res: @@ -88,6 +89,7 @@ def ldap_login(oldfnc): cr.commit() cr.close() return res + l.unbind() except Exception, e: continue cr.close() @@ -124,9 +126,11 @@ def ldap_check(oldfnc): dn=result_data[0][0] name=result_data[0][1]['cn'] if l.bind(dn, passwd): + l.unbind() security._uid_cache[uid] = passwd cr.close() return True + l.unbind() except Exception, e: pass cr.close() |
