From 599cb8bbb1f6955e273af4e9ce94dae66bfb29d3 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Fri, 25 Feb 2022 16:36:28 +0100 Subject: [PATCH] MDL-73233 shibboleth: Change urltogo only when dashboard is enabled --- auth/shibboleth/index.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auth/shibboleth/index.php b/auth/shibboleth/index.php index 030283ebcba..df0a7c97668 100644 --- a/auth/shibboleth/index.php +++ b/auth/shibboleth/index.php @@ -73,7 +73,7 @@ if (!has_capability('moodle/site:config', context_system::instance()) and !empty($CFG->defaulthomepage) and !isguestuser()) { if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') { - if ($CFG->defaulthomepage == HOMEPAGE_MY) { + if ($CFG->defaulthomepage == HOMEPAGE_MY && !empty($CFG->enabledashboard)) { $urltogo = $CFG->wwwroot.'/my/'; } else if ($CFG->defaulthomepage == HOMEPAGE_MYCOURSES) { $urltogo = $CFG->wwwroot.'/my/courses.php'; @@ -99,5 +99,3 @@ } else { print_error('shib_not_set_up_error', 'auth_shibboleth', '', $readmeurl); } - -