MDL-16349 we can now safely switch to the guest role
authorPetr Skoda <skodak@moodle.org>
Sat, 9 Oct 2010 19:55:18 +0000 (19:55 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 9 Oct 2010 19:55:18 +0000 (19:55 +0000)
lib/navigationlib.php

index f24fd62..6833393 100644 (file)
@@ -2924,7 +2924,7 @@ class settings_navigation extends navigation_node {
             $availableroles = get_switchable_roles($coursecontext);
             if (is_array($availableroles)) {
                 foreach ($availableroles as $key=>$role) {
-                    if ($key == $CFG->guestroleid || $assumedrole===(int)$key) {
+                    if ($assumedrole===(int)$key) {
                         continue;
                     }
                     $roles[$key] = $role;