forked from gitea/gitea
1
0
Fork 0

Merge pull request #2579 from nanoant/patch/fix-ldap-username

Fix #2221 LDAP username attribute must be fetched
This commit is contained in:
Unknwon 2016-02-07 12:27:10 -05:00
commit 08ff1b7d4b
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, str
search := ldap.NewSearchRequest(
userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter,
[]string{ls.AttributeName, ls.AttributeSurname, ls.AttributeMail},
[]string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail},
nil)
sr, err := l.Search(search)