Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Verified Commit 0b6f8348 authored by David Beniamine's avatar David Beniamine
Browse files

Better url detection

parent 2fd5b893
......@@ -23,5 +23,6 @@ $isTeacher = has_capability('mod/labnbook:addinstance', $context);
$role = ($isTeacher ? 'teacher' : 'learner');
global $USER;
$url = $fetchInstitution->getRedirectUrl();
$token=$fetchInstitution->getBindingTokenForRedirect($returnUrl, $role, $USER);
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$returnUrl";
$token=$fetchInstitution->getBindingTokenForRedirect($actual_link, $role, $USER);
redirect($url."?token=".$token);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment