]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8308 placement of load_all_capabilities() in login page
authorskodak <skodak>
Fri, 26 Jan 2007 21:09:21 +0000 (21:09 +0000)
committerskodak <skodak>
Fri, 26 Jan 2007 21:09:21 +0000 (21:09 +0000)
login/index.php

index 936ded2c180b215e70917426c9abc20ad51ad27f..4e08b823d75d7dc866e7b6d35578f93d5e66a755 100644 (file)
@@ -152,6 +152,9 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
             set_moodle_cookie($USER->username);
             set_login_session_preferences();
 
+            /// This is what lets the user do anything on the site :-)
+            load_all_capabilities();
+
             //Select password change url
             $userauth = get_auth_plugin($USER->auth);
             if ($userauth->can_change_password()) {
@@ -214,8 +217,6 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
 
             reset_login_count();
 
-            load_all_capabilities();     /// This is what lets the user do anything on the site  :-)
-
             redirect($urltogo);
 
             exit;