Skip to content
Browse files

MDL-23667 fixed unenscaped query

  • Loading branch information...
1 parent 846a5fe commit 11b153215dae7825446a780050355b481110b3b0 @skodak skodak committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 enrol/database/enrol.php
View
4 enrol/database/enrol.php
@@ -157,7 +157,7 @@ function setup_enrolments(&$user) {
if ($role_assignment->enrol == 'database') {
//error_log('[ENROL_DB] Removing user from context '.$role_assignment->contextid);
role_unassign($role_assignment->roleid, $user->id, '', $role_assignment->contextid);
- }
+ }
}
}
} else {
@@ -231,7 +231,7 @@ function sync_enrolments($role = null) {
$course = false;
$course = get_record( 'course',
$CFG->enrol_localcoursefield,
- $extcourse );
+ $enroldb->quote($extcourse) );
if (!is_object($course)) {
if (empty($CFG->enrol_db_autocreate)) { // autocreation not allowed

0 comments on commit 11b1532

Please sign in to comment.
Something went wrong with that request. Please try again.