diff --git a/index.php b/index.php index c47d03d835c..fbd0296b1ab 100755 --- a/index.php +++ b/index.php @@ -101,6 +101,15 @@ // Only if login form was not sent because if the form is sent the user was already on the page. Event::open(); } + +if (!api_is_anonymous()) { + $url = api_get_configuration_value('redirect_index_to_url_for_logged_users'); + if (!empty($url)) { + header("Location: $url"); + exit; + } +} + if (api_get_setting('display_categories_on_homepage') === 'true') { $controller->tpl->assign('course_category_block', $controller->return_courses_in_categories()); } diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index 26fb1088ca7..8dff7c8013c 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -901,6 +901,10 @@ // Round score in exercise category export //$_configuration['exercise_category_round_score_in_export'] = false; +// Redirect index to url for logged in users +// In this example the index.php will be redirected to user_portal.php for logged in users +//$_configuration['redirect_index_to_url_for_logged_users'] = 'user_portal.php'; + // ------ Custom DB changes (keep this at the end) // Add user activation by confirmation email // This option prevents the new user to login in the platform if your account is not confirmed via email