From 6c506ca74420eb971c3fbdbe2cb02da289b41b6a Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 25 Oct 2002 07:22:59 +0000 Subject: [PATCH] Disallow people posting in forums where they arent allowed to post! 8-. --- mod/forum/post.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/forum/post.php b/mod/forum/post.php index 2c87a9259c..b8b584f8c2 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -114,6 +114,10 @@ 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; -- 2.39.5