diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 52e7216a259..8cce3fb3272 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -2583,6 +2583,7 @@ function forum_user_can_view_post($post, $course, $user=NULL){ //first of all, the user must be in this course if (!(isstudent($forumcourse->course) or isteacher($forumcourse->course) or + ($course->id == SITEID && !$CFG->forcelogin) or (isguest() && $course->guest) )){ return false; }