Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-24938 fixed missing context ino

  • Loading branch information...
commit 2b9cc35e36281d9d466a110fc33a953c1b0158c0 1 parent 36b1c87
@skodak skodak authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 userpix/index.php
View
6 userpix/index.php
@@ -13,10 +13,11 @@
require_login();
/// Remove the following three lines if you want everyone to access it
-require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
+$syscontext = get_context_instance(CONTEXT_SYSTEM);
+require_capability('moodle/site:config', $syscontext);
$title = get_string("users");
-
+$PAGE->set_context($syscontext);
$PAGE->navbar->add($title);
$PAGE->set_title($title);
$PAGE->set_heading($title);
@@ -27,7 +28,6 @@
$fullname = fullname($user);
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=1\" ".
"title=\"$fullname\">";
- require_once($CFG->libdir.'/filelib.php');
echo $OUTPUT->user_picture($user);
echo "</a> \n";
}
Please sign in to comment.
Something went wrong with that request. Please try again.