MDL-21830 Prevent users from viewing names of all other site users - only teachers...
authorPetr Skoda <skodak@moodle.org>
Thu, 18 Mar 2010 22:15:41 +0000 (22:15 +0000)
committerPetr Skoda <skodak@moodle.org>
Thu, 18 Mar 2010 22:15:41 +0000 (22:15 +0000)
user/view.php

index 318183b..a0701d4 100644 (file)
@@ -130,7 +130,7 @@ if (!$currentuser) {
         }
 
         if (!has_capability('moodle/course:view', $coursecontext, $user->id, false)) {
-            if (has_capability('moodle/course:view', $coursecontext)) {
+            if (has_capability('moodle/role:assign', $coursecontext)) {
                 $PAGE->navbar->add($fullname);
                 echo $OUTPUT->heading(get_string('notenrolled', $fullname));
             } else {