[MERGE] [FIX] users_ldap: forward port of rev 7301 from 6.1, get rid of results without DN for searchResultReference
bzr revid: mat@openerp.com-20140127142836-pvta002gk1ckfzkh
This commit is contained in:
commit
29b03f073d
|
@ -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