Commit a7c2fca0 authored by Eric Chiang's avatar Eric Chiang Committed by GitHub

Merge pull request #645 from ericchiang/dev-ldap-fix-switch

connector/ldap: fix bug in switch statement
parents d7912a3a 43294061
......@@ -311,7 +311,8 @@ func (c *ldapConnector) Login(username, password string) (ident connector.Identi
switch n := len(resp.Entries); n {
case 0:
return fmt.Errorf("ldap: no results returned for filter: %q", filter)
case 2:
case 1:
default:
return fmt.Errorf("ldap: filter returned multiple (%d) results: %q", n, filter)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment