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 06606ca commit 09332feae8c6adc5df8ccafb14058e8d0037d982 @abgreeve abgreeve committed with nebgor Aug 14, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 login/index.php
View
12 login/index.php
@@ -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 09332fe

Please sign in to comment.