From 9c159dbafff2956e77e2dc8500c822b17ddf1965 Mon Sep 17 00:00:00 2001 From: Anuj Khandelwal Date: Tue, 4 Jun 2024 10:59:55 +0530 Subject: [PATCH] fix: enrich user creation webhook when user joins via authentication (#637) --- core/authenticate/service.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/authenticate/service.go b/core/authenticate/service.go index 7e04692ff..bb10dd89f 100644 --- a/core/authenticate/service.go +++ b/core/authenticate/service.go @@ -708,7 +708,12 @@ func (s Service) getOrCreateUser(ctx context.Context, email, title string) (user return user.User{}, err } _ = audit.GetAuditor(ctx, schema.PlatformOrgID.String()). - Log(audit.UserCreatedEvent, audit.UserTarget(newUser.ID)) + LogWithAttrs(audit.UserCreatedEvent, audit.UserTarget(newUser.ID), map[string]string{ + "email": newUser.Email, + "name": newUser.Name, + "title": newUser.Title, + "avatar": newUser.Avatar, + }) return newUser, nil }