]> git.mjollnir.org Git - moodle.git/commitdiff
user/view MDL-19077 set blocks context to always be the current user context
authormoodler <moodler>
Mon, 20 Jul 2009 06:09:27 +0000 (06:09 +0000)
committermoodler <moodler>
Mon, 20 Jul 2009 06:09:27 +0000 (06:09 +0000)
user/view.php

index e4eebe41328a77e8c06f3db649dd6514ef0c14d7..296b240731ef15904740ae2d943687b4e0ef483b 100644 (file)
@@ -52,6 +52,8 @@
     }
     $usercontext   = get_context_instance(CONTEXT_USER, $user->id);       // User context
 
+    $PAGE->context = $usercontext;
+
     if (!empty($CFG->forcelogin) || $course->id != SITEID) {
         // do not force parents to enrol
         if (!$DB->get_record('role_assignments', array('userid'=>$USER->id, 'contextid'=>$usercontext->id))) {