Merge branch 'MDL-64714-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE

This commit is contained in:
Andrew Nicols
2019-02-13 11:25:24 +08:00
2 changed files with 12 additions and 7 deletions
+6 -4
View File
@@ -273,13 +273,15 @@ class provider implements
return;
}
$userid = $contextlist->get_user()->id;
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel != CONTEXT_USER) {
return;
continue;
}
if ($context->instanceid == $userid) {
// Because we only use user contexts the instance ID is the user ID.
$DB->delete_records('mnet_log', ['userid' => $context->instanceid]);
}
// Because we only use user contexts the instance ID is the user ID.
$DB->delete_records('mnet_log', ['userid' => $context->instanceid]);
}
}
}
+6 -3
View File
@@ -178,12 +178,15 @@ class provider implements
if (empty($contextlist->count())) {
return;
}
$userid = $contextlist->get_user()->id;
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel != CONTEXT_USER) {
return;
continue;
}
if ($context->instanceid == $userid) {
// Because we only use user contexts the instance ID is the user ID.
static::delete_user_data($context->instanceid);
}
// Because we only use user contexts the instance ID is the user ID.
static::delete_user_data($context->instanceid);
}
}