]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from 1.7.
authorvyshane <vyshane>
Fri, 1 Dec 2006 05:21:22 +0000 (05:21 +0000)
committervyshane <vyshane>
Fri, 1 Dec 2006 05:21:22 +0000 (05:21 +0000)
mod/forum/lib.php

index eda41a4ca0caa2fdc83542f740cbe362a8d94e43..e37a9ccb45a5509f2bfd43b5ea55096906421971 100644 (file)
@@ -1669,13 +1669,16 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) {
                                AND u.deleted <> 1  $groupselect
                           ORDER BY u.email ASC");
     }
+       // Guest user should never be subscribed to a forum.
+       if ($guest = guest_user()) {
+               unset($results[$guest->id]);
+       }
 
     if ($cache) {
         $resultscache[$forum->id][$groupid] = $results;
     }
 
     return $results;
-
 }