summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2016-02-07 18:18:29 +0100
committerAdam Strzelecki <ono@java.pl>2016-02-07 18:18:29 +0100
commit3808638df10af1b306c98c92986543d57233d0b8 (patch)
treea46753ae2c1616b63c52d09fedd3266dc09b61c8 /modules/auth
parent894946c319aa0e961388227c7cff11b1392edfc7 (diff)
downloadgitea-3808638df10af1b306c98c92986543d57233d0b8.tar.gz
gitea-3808638df10af1b306c98c92986543d57233d0b8.zip
Fix #2221 LDAP username attribute must be fetched
This is fix-up for 573305f. Forgot to fetch AttributeUsername value from the LDAP server, so the setting was effectively not working as intended.
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/ldap/ldap.go2
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)