|
|
|
@ -151,11 +151,23 @@ function online_logout($user_id = null, $logout_redirect = false) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// After logout redirect to |
|
|
|
|
$url = api_get_path(WEB_PATH).'index.php'; |
|
|
|
|
|
|
|
|
|
if ($logout_redirect && api_get_plugin_setting('azure_active_directory', 'enable') == 'true') { |
|
|
|
|
$activeDirectoryPlugin = AzureActiveDirectory::create(); |
|
|
|
|
$azureLogout = $activeDirectoryPlugin->getUrl(AzureActiveDirectory::URL_TYPE_SIGNOUT); |
|
|
|
|
if (!empty($azureLogout)) { |
|
|
|
|
$url = $azureLogout; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CourseChatUtils::exitChat($user_id); |
|
|
|
|
session_regenerate_id(); |
|
|
|
|
Session::destroy(); |
|
|
|
|
|
|
|
|
|
if ($logout_redirect) { |
|
|
|
|
header("Location: ".api_get_path(WEB_PATH)."index.php"); |
|
|
|
|
header("Location: ".$url); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|