From 356e1d8f312b57078e9f33be9e4f13a30c5c140b Mon Sep 17 00:00:00 2001 From: Alex Yeung Date: Mon, 24 Jul 2023 22:34:28 +0100 Subject: [PATCH] MDL-78811 check: fix duplicate column contextid warning --- lib/classes/check/access/defaultuserrole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/check/access/defaultuserrole.php b/lib/classes/check/access/defaultuserrole.php index 28ad93377dc..965d24fbe94 100644 --- a/lib/classes/check/access/defaultuserrole.php +++ b/lib/classes/check/access/defaultuserrole.php @@ -76,7 +76,7 @@ class defaultuserrole extends check { } // Risky caps - usually very dangerous. - $sql = "SELECT rc.contextid, rc.capability + $sql = "SELECT rc.id, rc.contextid, rc.capability FROM {role_capabilities} rc JOIN {capabilities} cap ON cap.name = rc.capability WHERE " . $DB->sql_bitand('cap.riskbitmask', (RISK_XSS | RISK_CONFIG | RISK_DATALOSS)) . " <> 0