diff --git a/connector/ldap/ldap.go b/connector/ldap/ldap.go
index 53f9062f554a19ced11fd4732a1be040f6f77b5c..2e12a4c9ecb25f14dbd6fa83bf7db4259c2c3353 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,
+		},
 	}
 }