Fix AD searchfilter

This commit is contained in:
Chuyen Vo 2016-03-17 17:45:50 +07:00
parent 1ccd98a364
commit 02323d2fad

View File

@ -150,7 +150,7 @@ class User(db.Model):
if LDAP_TYPE == 'ldap':
searchFilter = "cn=%s" % self.username
else:
searchFilter = "sammaaccount=%s" % self.username
searchFilter = "(&(objectcategory=person)(samaccountname=%s))" % self.username
try:
result = self.ldap_search(searchFilter, LDAP_SEARCH_BASE)
except Exception, e: