From afa4506e11f96d05a727e591301f98fb50f8fad4 Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Thu, 7 Mar 2019 13:01:52 +0100 Subject: Support alternative home sites --- includes/pages/guest_login.php | 2 +- includes/pages/user_shifts.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 1b16333f..f507548b 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -414,7 +414,7 @@ function guest_login() $session->set('uid', $login_user->id); $session->set('locale', $login_user->settings->language); - redirect(page_link_to('news')); + redirect(page_link_to(config('home_site'))); } } diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 942b8849..4ddc8f70 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -118,7 +118,10 @@ function load_days() if (empty($days)) { error(__('The administration has not configured any shifts yet.')); - redirect(page_link_to('/')); + // Do not try to redirect to the current page + if (config('home_site') != 'user_shifts') { + redirect(page_link_to('/')); + } } return $days; } -- cgit v1.2.3-70-g09d2