Disallow people posting in forums where they arent allowed to post! 8-.
authormoodler <moodler>
Fri, 25 Oct 2002 07:22:59 +0000 (07:22 +0000)
committermoodler <moodler>
Fri, 25 Oct 2002 07:22:59 +0000 (07:22 +0000)
mod/forum/post.php

index 2c87a92..b8b584f 100644 (file)
         if (! $course = get_record("course", "id", $discussion->course)) {
             error("The course number was incorrect ($discussion->course)");
         }
+
+        if (! forum_user_can_post($forum)) {
+            error("Sorry, but you can not post in this forum.");
+        }
         // Load up the $post variable.
 
         $post->course  = $course->id;