From 884cf494cbef36786cb035b14bbbccbb19c122c3 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 28 Sep 2017 12:06:05 -0400 Subject: Only check LDAP attributes if auth data set (#7530) --- app/plugins.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/plugins.go b/app/plugins.go index 94a1bfd6f..2c87cee19 100644 --- a/app/plugins.go +++ b/app/plugins.go @@ -186,6 +186,10 @@ func (api *BuiltInPluginAPI) GetLdapUserAttributes(userId string, attributes []s return nil, err } + if user.AuthData == nil { + return map[string]string{}, nil + } + return api.app.Ldap.GetUserAttributes(*user.AuthData, attributes) } -- cgit v1.2.3-1-g7c22