From e72bd85285ac51aea10f3387f17a156ae28df272 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 17 Nov 2020 16:47:12 +0100 Subject: [PATCH] MDL-70242 auth_oauth2: set page context and url --- auth/oauth2/login.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auth/oauth2/login.php b/auth/oauth2/login.php index 5a9d7e8098a..9abb2a32cdf 100644 --- a/auth/oauth2/login.php +++ b/auth/oauth2/login.php @@ -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()) {