diff --git a/connector/ldap/ldap.go b/connector/ldap/ldap.go index 53f9062f..2e12a4c9 100644 --- a/connector/ldap/ldap.go +++ b/connector/ldap/ldap.go @@ -188,13 +188,13 @@ func parseScope(s string) (int, bool) { func (c *ldapConnector) userMatchers() []UserMatcher { if len(c.GroupSearch.UserMatchers) > 0 && c.GroupSearch.UserMatchers[0].UserAttr != "" { return c.GroupSearch.UserMatchers[:] - } else { - return []UserMatcher{ - { - UserAttr: c.GroupSearch.UserAttr, - GroupAttr: c.GroupSearch.GroupAttr, - }, - } + } + + return []UserMatcher{ + { + UserAttr: c.GroupSearch.UserAttr, + GroupAttr: c.GroupSearch.GroupAttr, + }, } }