From ac66abbd21303bfcb0493115a24c7874d20e8353 Mon Sep 17 00:00:00 2001 From: Dmitrii Metelkin Date: Sat, 16 Nov 2019 23:20:22 +1100 Subject: [PATCH] Fix error when page url is not set --- auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth.php b/auth.php index adc6ed2..7bb7678 100644 --- a/auth.php +++ b/auth.php @@ -137,7 +137,7 @@ class auth_plugin_userkey extends auth_plugin_base { * @throws \moodle_exception If something went wrong. */ public function user_login_userkey() { - global $SESSION, $CFG, $PAGE; + global $SESSION, $CFG; $keyvalue = required_param('key', PARAM_ALPHANUM); $wantsurl = optional_param('wantsurl', '', PARAM_URL); @@ -153,7 +153,7 @@ class auth_plugin_userkey extends auth_plugin_base { if (isloggedin()) { if ($SESSION->userid != $key->userid) { require_logout(); - $this->redirect($PAGE->url); // login url retry + $this->user_login_userkey(); } }