Syntax fix

This commit is contained in:
PMKuipers 2023-06-16 13:48:44 +02:00
parent 7f9af86201
commit 793ecd0756

View file

@ -247,7 +247,7 @@ function local_treestudyplan_find_cohortmembers($cohortid)
{ {
global $DB; global $DB;
// By default wherecondition retrieves all users except the deleted, not confirmed and guest. // By default wherecondition retrieves all users except the deleted, not confirmed and guest.
$params['cohortid'] = $cohortid; $params = ['cohortid' => $cohortid];
$sql = "SELECT * FROM {user} u $sql = "SELECT * FROM {user} u
JOIN {cohort_members} cm ON (cm.userid = u.id AND cm.cohortid = :cohortid) JOIN {cohort_members} cm ON (cm.userid = u.id AND cm.cohortid = :cohortid)
WHERE u.suspended = 0 AND u.id > 1 WHERE u.suspended = 0 AND u.id > 1