Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed $cfg->forceloginforprofiles logic SC#207. Backported from HEAD

  • Loading branch information...
commit 81ed299094dc1e296ef3e1ca9a18ac16fffac38a 1 parent c0e4f22
patrickslee authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 user/view.php
View
8 user/view.php
@@ -23,13 +23,15 @@
error("No such course id");
}
- if ($course->category) {
+ if (!empty($CFG->forcelogin) || $course->id != SITEID) {
require_login($course->id);
- } else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) {
+ }
+
+ if (!empty($CFG->forceloginforprofiles)) {
+ require_login();
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");
Please sign in to comment.
Something went wrong with that request. Please try again.