]> git.mjollnir.org Git - moodle.git/commitdiff
reverting isguest() changes
authorskodak <skodak>
Sun, 27 Aug 2006 08:10:03 +0000 (08:10 +0000)
committerskodak <skodak>
Sun, 27 Aug 2006 08:10:03 +0000 (08:10 +0000)
lib/moodlelib.php

index 82455867c0537304aa687c22b48bfce33fe7a185..4c313f9a5fd98da65f6cf804f8087c770bec8745 100644 (file)
@@ -2264,6 +2264,8 @@ function isstudent($courseid, $userid=0) {
 function isguest($userid=0) {
     global $USER, $CFG;
 
+// can not be used because admin has guest capability :-(
+/*
     if (!empty($CFG->rolesactive)) {
 
         $context = get_context_instance(CONTEXT_SYSTEM, SITEID);  
@@ -2274,7 +2276,7 @@ function isguest($userid=0) {
             return has_capability('moodle/legacy:guest', $context, $userid);
         }
     }
-
+*/
     if (!$userid) {
         if (empty($USER->username)) {
             return false;