|
|
@ -91,18 +91,21 @@ class Redirect |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// If the user is a platform admin, redirect to the main admin page |
|
|
|
global $_configuration; |
|
|
|
if (api_is_multiple_url_enabled()) { |
|
|
|
if (empty($_configuration['redirect_admin_to_courses_list']) or $_configuration['redirect_admin_to_courses_list'] === 'false') { |
|
|
|
// if multiple URLs are enabled, make sure he's admin of the |
|
|
|
// If the user is a platform admin, redirect to the main admin page |
|
|
|
// current URL before redirecting |
|
|
|
if (api_is_multiple_url_enabled()) { |
|
|
|
$url = api_get_current_access_url_id(); |
|
|
|
// if multiple URLs are enabled, make sure he's admin of the |
|
|
|
if (api_is_platform_admin_by_id($user_id, $url)) { |
|
|
|
// current URL before redirecting |
|
|
|
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php'); |
|
|
|
$url = api_get_current_access_url_id(); |
|
|
|
} |
|
|
|
if (api_is_platform_admin_by_id($user_id, $url)) { |
|
|
|
} else { |
|
|
|
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php'); |
|
|
|
// if no multiple URL, then it's enough to be platform admin |
|
|
|
} |
|
|
|
if (api_is_platform_admin_by_id($user_id)) { |
|
|
|
} else { |
|
|
|
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php'); |
|
|
|
// if no multiple URL, then it's enough to be platform admin |
|
|
|
|
|
|
|
if (api_is_platform_admin_by_id($user_id)) { |
|
|
|
|
|
|
|
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$page_after_login = api_get_setting('page_after_login'); |
|
|
|
$page_after_login = api_get_setting('page_after_login'); |
|
|
|