Abort syncrhonization from LDAP source if there is some error. (#7960)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
This commit is contained in:
parent
e3115cc019
commit
8c24bb9e43
2 changed files with 11 additions and 6 deletions
|
@ -1673,7 +1673,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue