Redirect index to url for logged in users see BT#14457

$_configuration['redirect_index_to_url_for_logged_users'] = 'user_portal.php';
pull/2573/head
Julio 7 years ago
parent 2cba428ab8
commit 0f25790214
  1. 9
      index.php
  2. 4
      main/install/configuration.dist.php

@ -101,6 +101,15 @@ if (!empty($_POST['submitAuth'])) {
// Only if login form was not sent because if the form is sent the user was already on the page. // Only if login form was not sent because if the form is sent the user was already on the page.
Event::open(); 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') { if (api_get_setting('display_categories_on_homepage') === 'true') {
$controller->tpl->assign('course_category_block', $controller->return_courses_in_categories()); $controller->tpl->assign('course_category_block', $controller->return_courses_in_categories());
} }

@ -901,6 +901,10 @@ VALUES (2, 13, 'session_courses_read_only_mode', 'Lock Course In Session', 1, 1,
// Round score in exercise category export // Round score in exercise category export
//$_configuration['exercise_category_round_score_in_export'] = false; //$_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) // ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email // 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 // This option prevents the new user to login in the platform if your account is not confirmed via email

Loading…
Cancel
Save