Abort syncrhonization from LDAP source if there is some error. (#7965)

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
(cherry picked from commit b2d23a1389)
This commit is contained in:
David Svantesson authored and Antoine GIRARD committed 2019-08-25 02:59:21 +02:00
1 parent 30dbddcc4d
commit b6b1560701
2 files changed
+11 -6

No files matched your search

+6 -1
View File
@@ -1645,7 +1645,12 @@ func SyncExternalUsers() {
return
}
sr := s.LDAP().SearchEntries()
sr, err := s.LDAP().SearchEntries()
if err != nil {
log.Error("SyncExternalUsers LDAP source failure [%s], skipped", s.Name)
continue
}
for _, su := range sr {
if len(su.Username) == 0 {
continue