# HG changeset patch # User "Lorenzo M. Catucci" # Date 2011-04-26 14:02:18 # Node ID 28060f0ac6c663e17c5d19549e4c25fc65391577 # Parent c93234e9ac3622cfac12492dcc277e4ea8cb71fd Fetch entry after successful bind for being able to read its attributes. diff --git a/rhodecode/lib/auth_ldap.py b/rhodecode/lib/auth_ldap.py --- a/rhodecode/lib/auth_ldap.py +++ b/rhodecode/lib/auth_ldap.py @@ -105,9 +105,10 @@ class AuthLdap(object): if not lobjects: raise ldap.NO_SUCH_OBJECT() - for (dn, attrs) in lobjects: + for (dn, _attrs) in lobjects: try: server.simple_bind_s(dn, password) + attrs = server.search_ext_s(dn, ldap.SCOPE_BASE, '(objectClass=*)')[0][1] break except ldap.INVALID_CREDENTIALS, e: