diff --git a/classes/loginflow/authcode.php b/classes/loginflow/authcode.php index a446cfd..7f21fc4 100644 --- a/classes/loginflow/authcode.php +++ b/classes/loginflow/authcode.php @@ -106,7 +106,7 @@ public function handleredirect() { // Response from OP. $this->handleauthresponse($requestparams); } else { - if (isloggedin() && empty($justauth) && empty($promptaconsent)) { + if (isloggedin() && !isguestuser() && empty($justauth) && empty($promptaconsent)) { if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) { $urltogo = $SESSION->wantsurl; unset($SESSION->wantsurl);