summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorHarshit Bansal <harshitbansal2015@gmail.com>2019-01-20 01:27:27 +0530
committertechknowlogick <hello@techknowlogick.com>2019-01-19 14:57:27 -0500
commit6822a8993b847c794c84ab241c5e0088611bb199 (patch)
tree7d230d240965b618afea865f814374c4b81199cb /modules/auth
parentc212c9846337f2d04796dfa69be006e882abeaca (diff)
downloadgitea-6822a8993b847c794c84ab241c5e0088611bb199.tar.gz
gitea-6822a8993b847c794c84ab241c5e0088611bb199.zip
ldap: Adjust log settings when a user is not found. (#5771)
Fixes: #3849.
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/ldap/ldap.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go
index c33dbea11b..010b4ea868 100644
--- a/modules/auth/ldap/ldap.go
+++ b/modules/auth/ldap/ldap.go
@@ -164,7 +164,7 @@ func checkAdmin(l *ldap.Conn, ls *Source, userDN string) bool {
if err != nil {
log.Error(4, "LDAP Admin Search failed unexpectedly! (%v)", err)
} else if len(sr.Entries) < 1 {
- log.Error(4, "LDAP Admin Search failed")
+ log.Trace("LDAP Admin Search found no matching entries.")
} else {
return true
}
@@ -259,9 +259,9 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) *SearchResul
return nil
} else if len(sr.Entries) < 1 {
if directBind {
- log.Error(4, "User filter inhibited user login.")
+ log.Trace("User filter inhibited user login.")
} else {
- log.Error(4, "LDAP Search failed unexpectedly! (0 entries)")
+ log.Trace("LDAP Search found no matching entries.")
}
return nil