Separate SCIM export email from event user name

Load identity email for matched profiles and drop parsing
userName as email; user_name column stays the event value.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-07-29 21:48:02 +00:00
parent 6cbf16814c
commit 6906e0ff5b
3 changed files with 6 additions and 32 deletions

View File

@@ -507,7 +507,7 @@ SELECT
p.id,
p.identity_id,
p.organization_id,
''::citext AS email_address,
i.email_address,
p.source,
p.state,
p.full_name,
@@ -540,6 +540,8 @@ SELECT
p.updated_at
FROM
iam_membership_profiles p
INNER JOIN identities i
ON i.id = p.identity_id
WHERE
p.%s
AND p.organization_id = @organization_id