Permalink
Browse files

MDL-32108 - navigation - After logging in the user is directed to mys…

…ite instead of site home.

Thanks to lurii Kucherov for this patch.
  • Loading branch information...
1 parent c92d6f4 commit 5a3f67af27245bc63435fd262a88165f7cec7dbf @abgreeve abgreeve committed Aug 14, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 login/index.php
View
@@ -204,16 +204,16 @@
// no wantsurl stored or external - go to homepage
$urltogo = $CFG->wwwroot.'/';
unset($SESSION->wantsurl);
- }
- /// Go to my-moodle page instead of site homepage if defaulthomepage set to homepage_my
- if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_MY && !is_siteadmin() && !isguestuser()) {
- if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') {
- $urltogo = $CFG->wwwroot.'/my/';
+ $home_page = get_home_page();
+ // Go to my-moodle page instead of site homepage if defaulthomepage set to homepage_my
+ if ($home_page == HOMEPAGE_MY && !is_siteadmin() && !isguestuser()) {
+ if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') {
+ $urltogo = $CFG->wwwroot.'/my/';
+ }
}
}
-
/// check if user password has expired
/// Currently supported only for ldap-authentication module
$userauth = get_auth_plugin($USER->auth);

0 comments on commit 5a3f67a

Please sign in to comment.