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