diff --git a/cohort/locallib.php b/cohort/locallib.php index 23fa8a6deb1..62dcfdfe90c 100644 --- a/cohort/locallib.php +++ b/cohort/locallib.php @@ -126,7 +126,7 @@ class cohort_existing_selector extends user_selector_base { if (!$this->is_validating()) { $potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params); - if ($potentialmemberscount > 100) { + if ($potentialmemberscount > $this->maxusersperpage) { return $this->too_many_results($search, $potentialmemberscount); } }