diff --git a/user/edit.php b/user/edit.php index a8e7138b13093..6fa160819e9e3 100644 --- a/user/edit.php +++ b/user/edit.php @@ -36,7 +36,7 @@ $course = optional_param('course', SITEID, PARAM_INT); // course id (defaults to Site) $cancelemailchange = optional_param('cancelemailchange', 0, PARAM_INT); // course id (defaults to Site) -$PAGE->set_url('/user/edit.php', array('course'=>$course, 'id'=>$userid, 'cancelemailchange'=>$cancelemailchange)); +$PAGE->set_url('/user/edit.php', array('course'=>$course, 'id'=>$userid)); if (!$course = $DB->get_record('course', array('id'=>$course))) { print_error('invalidcourseid'); @@ -50,7 +50,8 @@ } redirect(get_login_url()); } else { - $PAGE->set_course($course); + $PAGE->set_context(get_system_context()); + $PAGE->set_pagelayout('standard'); } // Guest can not edit