diff options
author | Unknwon <u@gogs.io> | 2016-02-07 12:27:10 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-07 12:27:10 -0500 |
commit | 08ff1b7d4b3478b3870a1416d01b943f0dc6ef11 (patch) | |
tree | 1cc3bb63793c728b3690c9ff53ef8026154605e3 /modules | |
parent | ee53204e02f210b8c60e818aaf226869f0a6b986 (diff) | |
parent | 3808638df10af1b306c98c92986543d57233d0b8 (diff) | |
download | gitea-08ff1b7d4b3478b3870a1416d01b943f0dc6ef11.tar.gz gitea-08ff1b7d4b3478b3870a1416d01b943f0dc6ef11.zip |
Merge pull request #2579 from nanoant/patch/fix-ldap-username
Fix #2221 LDAP username attribute must be fetched
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/ldap/ldap.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go index 313c235508..7f36c8bd57 100644 --- a/modules/auth/ldap/ldap.go +++ b/modules/auth/ldap/ldap.go @@ -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) |