User capabilities are now properly loaded.

This commit is contained in:
exe-cutor
2006-11-13 11:52:18 +00:00
parent d485515725
commit dc13c4f8a3
2 changed files with 10 additions and 6 deletions
+1 -6
View File
@@ -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 <[email protected]>
--------------------------------------------------------------------------------
In case of problems and questions with Shibboleth authentication, contact
Lukas Haemmerle <[email protected]> or Markus Hagman <[email protected]>
+9
View File
@@ -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);
}