From 464e6bdd03a7beb9d8c9eda1950a7e4016ea2470 Mon Sep 17 00:00:00 2001 From: Niels de Troije Date: Thu, 25 Jan 2024 09:51:45 +0100 Subject: [PATCH] Adding debug info for user existence check --- uaa/users.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uaa/users.go b/uaa/users.go index e883b8f0..107aabba 100644 --- a/uaa/users.go +++ b/uaa/users.go @@ -41,14 +41,18 @@ func (u *Users) Exists(userName string) bool { func (u *Users) GetByNameAndOrigin(userName, origin string) *User { if u.userMap == nil { + lo.G.Debugf("GetByNameAndOrigin: No users found in UAA, returning NIL") return nil } userList := u.userMap[strings.ToLower(userName)] for _, user := range userList { + lo.G.Debugf("GetByNameAndOrigin: Checking user's origin [%s] for user [%s] against origin [%s]", user.Origin, user.Username, origin) if strings.EqualFold(user.Origin, origin) { + lo.G.Debugf("GetByNameAndOrigin: Found user [%s] with origin [%s]", user.Username, origin) return &user } } + lo.G.Debugf("GetByNameAndOrigin: No user found for [%s] with origin [%s], returning NIL", userName, origin) return nil }