From: skodak Date: Wed, 19 Apr 2006 19:42:47 +0000 (+0000) Subject: isguest() must be checked AFTER require_login() because the user may not be logged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7282d18cf033316ebf1970e02933f62a8a2246e2;p=moodle.git isguest() must be checked AFTER require_login() because the user may not be logged in yet ;-) --- diff --git a/mod/data/rate.php b/mod/data/rate.php index 3dbdc16572..306e6431a0 100755 --- a/mod/data/rate.php +++ b/mod/data/rate.php @@ -1,11 +1,7 @@ -id); + if (isguest()) { + error("Guests are not allowed to rate posts.", $_SERVER["HTTP_REFERER"]); + } + $CFG->debug = 0; /// Temporarily $returntoview = false;