Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-29672 user: Fixed user edit page for non-admin users

  • Loading branch information...
commit 01ec550b0f13cf1bdd395f6745b2c6f68cdaddea 1 parent b77088c
@samhemelryk samhemelryk authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 user/edit.php
View
5 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
Please sign in to comment.
Something went wrong with that request. Please try again.