diff --git a/app/plugins.go b/app/plugins.go index 94a1bfd6f0..2c87cee19f 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) }