mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
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:
committed by
Antoine GIRARD
parent
30dbddcc4d
commit
b6b1560701
@ -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
|
||||
|
Reference in New Issue
Block a user