[FIX] users_ldap: forward port of rev 7301 from 6.1, get rid of results without DN for searchResultReference, courtesy of Patrick Monnerat
lp bug: https://launchpad.net/bugs/983123 fixed bzr revid: mat@openerp.com-20140127140009-o50fhhs5z0vjklwc
This commit is contained in:
parent
d9cdc8564c
commit
d43002c14b
|
@ -99,6 +99,9 @@ class CompanyLDAP(osv.osv):
|
|||
filter = filter_format(conf['ldap_filter'], (login,))
|
||||
try:
|
||||
results = self.query(conf, filter)
|
||||
|
||||
# Get rid of (None, attrs) for searchResultReference replies
|
||||
results = [i for i in results if i[0]]
|
||||
if results and len(results) == 1:
|
||||
dn = results[0][0]
|
||||
conn = self.connect(conf)
|
||||
|
|
Loading…
Reference in New Issue