From 7ac34ceea11c7aa37c966af39c32707f67b19912 Mon Sep 17 00:00:00 2001 From: Javier Troya Date: Mon, 3 Mar 2025 18:01:33 +0100 Subject: [PATCH] Fix auth redirections. --- app/Hooks/Auth/Routes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Hooks/Auth/Routes.php b/app/Hooks/Auth/Routes.php index 84a131e..f514f03 100644 --- a/app/Hooks/Auth/Routes.php +++ b/app/Hooks/Auth/Routes.php @@ -65,6 +65,9 @@ public static function template_redirect(): void { wp_redirect(app_get_initial_page($current_user)); exit; } + } elseif(!is_user_logged_in() && !$is_allowed_page) { + wp_redirect(wp_logout_url()); + exit; } } }