Guests can't enrol. MDL-7182

This commit is contained in:
moodler
2006-10-24 02:12:26 +00:00
parent a064e86c8b
commit 3c9367fb62
+4
View File
@@ -12,6 +12,10 @@
require_login();
if ($USER->username == 'guest') { // Guests can't enrol in anything!
redirect($CFG->wwwroot.'/login/index.php');
}
if (! $course = get_record('course', 'id', $id) ) {
error("That's an invalid course id");
}