Merge branch 'MDL-72110-311' of https://github.com/sharidas/moodle into MOODLE_311_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2021-09-22 20:12:18 +02:00
+1 -1
View File
@@ -352,7 +352,7 @@ function core_login_get_return_url() {
if ($urltogo == ($CFG->wwwroot . '/')) {
$homepage = get_home_page();
// Go to my-moodle page instead of site homepage if defaulthomepage set to homepage_my.
if ($homepage == HOMEPAGE_MY && !is_siteadmin() && !isguestuser()) {
if ($homepage === HOMEPAGE_MY && !isguestuser()) {
if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') {
$urltogo = $CFG->wwwroot.'/my/';
}