mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-32108 - navigation - After logging in the user is directed to mysite instead of site home.
Thanks to lurii Kucherov for this patch.
This commit is contained in:
parent
c92d6f417c
commit
5a3f67af27
@ -204,16 +204,16 @@ if ($frm and isset($frm->username)) { // Login WITH
|
||||
// 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user