]> git.mjollnir.org Git - moodle.git/commitdiff
- Preventing guest for posting comments on entries
authorwillcast <willcast>
Tue, 21 Oct 2003 18:32:36 +0000 (18:32 +0000)
committerwillcast <willcast>
Tue, 21 Oct 2003 18:32:36 +0000 (18:32 +0000)
mod/glossary/comment.php

index 3051551da3a766f2f20a1412194c38c5c6073056..8bdda5c2651f9e116d5a726524057cf54a48601d 100644 (file)
@@ -41,7 +41,9 @@
     if (!$cm->visible and !isteacher($course->id)) {
         notice(get_string("activityiscurrentlyhidden"));
     } 
-    
+    if (isguest()) {
+        error("Guests are not allowed to post comments", $_SERVER["HTTP_REFERER"]);
+    }    
     add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id");
     
 /// Printing the page header