mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-63785 auth_mnet: performance improvement
This commit is contained in:
parent
28dfbe77bf
commit
a246822931
@ -161,18 +161,10 @@ class provider implements
|
||||
return;
|
||||
}
|
||||
|
||||
$params = [
|
||||
'contextuser' => CONTEXT_USER,
|
||||
'contextid' => $context->id
|
||||
];
|
||||
|
||||
$sql = "SELECT ctx.instanceid as userid
|
||||
FROM {mnet_log} ml
|
||||
JOIN {context} ctx
|
||||
ON ctx.instanceid = ml.userid
|
||||
AND ctx.contextlevel = :contextuser
|
||||
WHERE ctx.id = :contextid";
|
||||
|
||||
$sql = "SELECT userid
|
||||
FROM {mnet_log}
|
||||
WHERE userid = ?";
|
||||
$params = [$context->instanceid];
|
||||
$userlist->add_from_sql('userid', $sql, $params);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user