Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Better protection against Googlers
  • Loading branch information
moodler committed May 3, 2004
1 parent c81c6d0 commit 555b851
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion user/view.php
Expand Up @@ -19,8 +19,13 @@
error("No such course id");
}

if ($course->category or $CFG->forcelogin or !empty($CFG->forceloginforprofiles)) {
if ($course->category) {
require_login($course->id);
} else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) {
if (isguest()) {
redirect("$CFG->wwwroot/login/index.php");
}
require_login();
}

add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id");
Expand Down

0 comments on commit 555b851

Please sign in to comment.