Added saving of GET variables

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-06-10 15:22:56 +04:00
parent b7f6d20259
commit 9afca45377
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

View File

@ -152,10 +152,10 @@ class auth_plugin_link extends auth_plugin_base {
public function redirect_user() {
global $CFG, $SESSION;
$redirect = $CFG->wwwroot;
$redirect = new moodle_url($CFG->wwwroot, $_GET);
if (isset($SESSION->wantsurl)) {
$redirect = $SESSION->wantsurl;
$redirect = new moodle_url($SESSION->wantsurl, $_GET);
} else if (isset($_GET['wantsurl'])) {
$redirect = htmlspecialchars($_GET['wantsurl']);
}