first commit
This commit is contained in:
0
volumes/snippets/.gitkeep
Normal file
0
volumes/snippets/.gitkeep
Normal file
16
volumes/snippets/Untitled query 224.sql
Normal file
16
volumes/snippets/Untitled query 224.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE OR REPLACE FUNCTION public.check_email_exists(p_email text)
|
||||
RETURNS boolean
|
||||
LANGUAGE sql
|
||||
SECURITY DEFINER
|
||||
SET search_path = auth
|
||||
AS $$
|
||||
SELECT EXISTS(
|
||||
SELECT 1
|
||||
FROM auth.users
|
||||
WHERE email = p_email
|
||||
AND deleted_at IS NULL
|
||||
);
|
||||
$$;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public.check_email_exists(text) TO anon;
|
||||
GRANT EXECUTE ON FUNCTION public.check_email_exists(text) TO authenticated;
|
||||
Reference in New Issue
Block a user