Skip to content

Commit

Permalink
MDL-32108 - navigation - After logging in the user is directed to mys…
Browse files Browse the repository at this point in the history
…ite instead of site home.

Thanks to lurii Kucherov for this patch.
  • Loading branch information
abgreeve authored and Aparup Banerjee committed Aug 30, 2012
1 parent bc67dfd commit edd2686
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions login/index.php
Expand Up @@ -204,16 +204,16 @@
// no wantsurl stored or external - go to homepage // no wantsurl stored or external - go to homepage
$urltogo = $CFG->wwwroot.'/'; $urltogo = $CFG->wwwroot.'/';
unset($SESSION->wantsurl); unset($SESSION->wantsurl);
}


/// Go to my-moodle page instead of site homepage if defaulthomepage set to homepage_my $home_page = get_home_page();
if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_MY && !is_siteadmin() && !isguestuser()) { // Go to my-moodle page instead of site homepage if defaulthomepage set to homepage_my
if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') { if ($home_page == HOMEPAGE_MY && !is_siteadmin() && !isguestuser()) {
$urltogo = $CFG->wwwroot.'/my/'; if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') {
$urltogo = $CFG->wwwroot.'/my/';
}
} }
} }



/// check if user password has expired /// check if user password has expired
/// Currently supported only for ldap-authentication module /// Currently supported only for ldap-authentication module
$userauth = get_auth_plugin($USER->auth); $userauth = get_auth_plugin($USER->auth);
Expand Down

0 comments on commit edd2686

Please sign in to comment.