Skip to content

Commit

Permalink
MDL-24938 fixed missing context ino
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 29, 2010
1 parent 36b1c87 commit 2b9cc35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions userpix/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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";
}
Expand Down

0 comments on commit 2b9cc35

Please sign in to comment.