providers/ldap: fix error not being checked correctly when fetching users
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
388367785d
commit
146d54813c
|
@ -124,12 +124,12 @@ func (ds *DirectSearcher) Search(req *search.Request) (ldap.ServerSearchResult,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
u, _, e := searchReq.Execute()
|
u, _, err := searchReq.Execute()
|
||||||
uapisp.Finish()
|
uapisp.Finish()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
req.Log().WithError(err).Warning("failed to get users")
|
req.Log().WithError(err).Warning("failed to get users")
|
||||||
return e
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
users = &u.Results
|
users = &u.Results
|
||||||
|
@ -152,7 +152,6 @@ func (ds *DirectSearcher) Search(req *search.Request) (ldap.ServerSearchResult,
|
||||||
|
|
||||||
users = &u
|
users = &u
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue