From 574551d9c8f3e769a21e0f5b51805022173fa613 Mon Sep 17 00:00:00 2001 From: exe-cutor Date: Mon, 13 Nov 2006 11:54:07 +0000 Subject: [PATCH] Merged user capabilities fix for 1.7 --- auth/shibboleth/README.txt | 7 +------ auth/shibboleth/index.php | 9 +++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/auth/shibboleth/README.txt b/auth/shibboleth/README.txt index 5cf59795ab..32db7c2760 100644 --- a/auth/shibboleth/README.txt +++ b/auth/shibboleth/README.txt @@ -14,7 +14,7 @@ Changes: - 10. 2005: Added better error messages and moved text to language directories - 02. 2006: Simplified authentication so that authorization works properly Added instructions for IIS - +- 11. 2006: User capabilities are now loaded properly as of Moodle 1.7+ Moodle Configuration with Dual login @@ -164,11 +164,6 @@ Example file: ?> -- -Bugs --------------------------------------------------------------------------------- -Please send bug reports concerning the Shibboleth part to -Lukas Haemmerle - -------------------------------------------------------------------------------- In case of problems and questions with Shibboleth authentication, contact Lukas Haemmerle or Markus Hagman diff --git a/auth/shibboleth/index.php b/auth/shibboleth/index.php index f85a6bb92a..5ea4566ad9 100644 --- a/auth/shibboleth/index.php +++ b/auth/shibboleth/index.php @@ -56,6 +56,15 @@ $urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page unset($SESSION->wantsurl); /// Just in case } + + /// Go to my-moodle page instead of homepage if mymoodleredirect enabled + if (!has_capability('moodle/site:config',get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->mymoodleredirect) and !isguest()) { + if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') { + $urltogo = $CFG->wwwroot.'/my/'; + } + } + + load_all_capabilities(); /// This is what lets the user do anything on the site :-) redirect($urltogo); } -- 2.39.5