Skip to content

Commit 6aa1260

Browse files
chore: sql script to fetch user information (#274)
1 parent 474f2e5 commit 6aa1260

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/getUserStatuses.sql

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT
2+
u.id AS user_id,
3+
u.name AS user_name,
4+
u.email AS user_email,
5+
CASE
6+
WHEN t.id IS NOT NULL THEN concat('https://my.ichack.org/register?token=', t.id)
7+
END AS user_url
8+
FROM public.users u
9+
LEFT JOIN public.token t ON u.id = t.user_id AND t.type = 'registration_link';

0 commit comments

Comments
 (0)