diff options
author | David Svantesson <davidsvantesson@gmail.com> | 2019-08-24 20:53:37 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-08-24 21:53:37 +0300 |
commit | 8c24bb9e4344791ca2e8c66efcf3d45881365a5d (patch) | |
tree | 817a0a090a96cf9db8eebdf5928442a9f3ed01d6 /models/user.go | |
parent | e3115cc019211fa2549f6943d379bf58fe7b7d7d (diff) | |
download | gitea-8c24bb9e4344791ca2e8c66efcf3d45881365a5d.tar.gz gitea-8c24bb9e4344791ca2e8c66efcf3d45881365a5d.zip |
Abort syncrhonization from LDAP source if there is some error. (#7960)
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index c8664cc4c8..ed0fe524e4 100644 --- a/models/user.go +++ b/models/user.go @@ -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 |