]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib:load_all_capabilities() - fix guest user setup for multi-enrol
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:16:04 +0000 (07:16 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:16:04 +0000 (07:16 +0000)
When setting things up for the guest user, the RA entry in accessdata
was not multi-enrol-friendly. Must have glossed it over in the
multi-enrol rework.

lib/accesslib.php

index 0a9adeefa77a836907c94c634e4bbe8d3c7f856e..8e08e10c809b2acba29ec101a58fa550bbd2c490 100755 (executable)
@@ -1586,7 +1586,7 @@ function load_all_capabilities() {
         // Load the rdefs
         $USER->access = get_role_access($guest->id);
         // Put the ghost enrolment in place...
-        $USER->access['ra'][$base] = $guest->id;
+        $USER->access['ra'][$base] = array($guest->id);
 
     } else if (isloggedin()) {