handle unexpected error in ldap search

This commit is contained in:
Tan Jiang 2017-05-03 18:54:41 +08:00
parent 97e214c3d3
commit 7487095dd8

View File

@ -59,7 +59,8 @@ func (l *Auth) Authenticate(m models.AuthModel) (*models.User, error) {
ldapUsers, err := ldapUtils.SearchUser(ldapConfs)
if err != nil {
return nil, fmt.Errorf("ldap search fail: %v", err)
log.Warningf("ldap search fail: %v", err)
return nil, nil
}
if len(ldapUsers) == 0 {