diff --git a/autologin.php b/autologin.php index a70ea4467..f6599948d 100644 --- a/autologin.php +++ b/autologin.php @@ -31,4 +31,4 @@ \auth_saml2\auto_login::finish((bool)$success, new moodle_url($url)); // Something strange went wrong, or somebody tried to directly link here. -print_error('errorinvalidautologin', 'auth_saml2'); +throw new \moodle_exception('errorinvalidautologin', 'auth_saml2');