© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
4 replies
.Volxen

will this trigger work when the user updates their email?

create function public.update_user_email()
returns trigger
language plpgsql
security definer set search_path = public
as $$
begin
  update public.users
  set email = new.email
  where id = new.id;
  return new;
end;
$$;
create function public.update_user_email()
returns trigger
language plpgsql
security definer set search_path = public
as $$
begin
  update public.users
  set email = new.email
  where id = new.id;
  return new;
end;
$$;

and adding it to on auth.users updat
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

error when inserting new user trigger
SupabaseSSupabase / help-and-questions
3y ago
Trigger on email verification
SupabaseSSupabase / help-and-questions
4y ago
What is the 'code' in the url when you are redirected back from a user who confirmed their email?
SupabaseSSupabase / help-and-questions
7mo ago
Database error saving new user when using trigger
SupabaseSSupabase / help-and-questions
3y ago