MDL-62384 logstore_standard: Remove unnecessary join on context

This commit is contained in:
Andrew Nicols
2018-05-11 09:15:29 +08:00
parent 037027230a
commit 09f9af4729
@@ -74,10 +74,8 @@ class provider implements
*/
public static function add_contexts_for_userid(contextlist $contextlist, $userid) {
$sql = "
SELECT ctx.id
FROM {context} ctx
JOIN {logstore_standard_log} l
ON l.contextid = ctx.id
SELECT l.contextid
FROM {logstore_standard_log} l
WHERE l.userid = :userid1
OR l.relateduserid = :userid2
OR l.realuserid = :userid3";