mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 19:27:49 +00:00
Remove debug helper for OTP
This commit is contained in:
@@ -140,8 +140,12 @@ AS $email_validation$
|
|||||||
-- Verify token
|
-- Verify token
|
||||||
SELECT auth.verify_otp_fn(token) INTO _email;
|
SELECT auth.verify_otp_fn(token) INTO _email;
|
||||||
IF _email IS NOT NULL THEN
|
IF _email IS NOT NULL THEN
|
||||||
|
-- Check the email JWT token match the OTP email
|
||||||
|
IF current_setting('user.email', true) <> _email THEN
|
||||||
|
RETURN False;
|
||||||
|
END IF;
|
||||||
-- Set user email into env to allow RLS update
|
-- Set user email into env to allow RLS update
|
||||||
PERFORM set_config('user.email', _email, false);
|
--PERFORM set_config('user.email', _email, false);
|
||||||
-- Enable email_validation into user preferences
|
-- Enable email_validation into user preferences
|
||||||
PERFORM api.update_user_preferences_fn('{email_valid}'::TEXT, True::TEXT);
|
PERFORM api.update_user_preferences_fn('{email_valid}'::TEXT, True::TEXT);
|
||||||
-- Enable email_notifications
|
-- Enable email_notifications
|
||||||
|
Reference in New Issue
Block a user