Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 81ed299094dc1e296ef3e1ca9a18ac16fffac38a 1 parent c0e4f22
authored December 29, 2005

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  user/view.php
8  user/view.php
@@ -23,13 +23,15 @@
23 23
         error("No such course id");
24 24
     }
25 25
 
26  
-    if ($course->category) {
  26
+    if (!empty($CFG->forcelogin) || $course->id != SITEID) {
27 27
         require_login($course->id);
28  
-    } else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) {
  28
+    }
  29
+
  30
+    if (!empty($CFG->forceloginforprofiles)) {
  31
+        require_login();
29 32
         if (isguest()) {
30 33
             redirect("$CFG->wwwroot/login/index.php");
31 34
         }
32  
-        require_login();
33 35
     }
34 36
 
35 37
     add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id");

0 notes on commit 81ed299

Please sign in to comment.
Something went wrong with that request. Please try again.