MDL-70242 auth_oauth2: set page context and url
authorMarina Glancy <marina@moodle.com>
Tue, 17 Nov 2020 15:47:12 +0000 (16:47 +0100)
committerMarina Glancy <marina@moodle.com>
Tue, 17 Nov 2020 15:47:59 +0000 (16:47 +0100)
auth/oauth2/login.php

index 5a9d7e8..9abb2a3 100644 (file)
@@ -27,6 +27,9 @@ require_once('../../config.php');
 $issuerid = required_param('id', PARAM_INT);
 $wantsurl = new moodle_url(optional_param('wantsurl', '', PARAM_URL));
 
+$PAGE->set_context(context_system::instance());
+$PAGE->set_url(new moodle_url('/auth/oauth2/login.php', ['id' => $issuerid]));
+
 require_sesskey();
 
 if (!\auth_oauth2\api::is_enabled()) {