1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-02 15:02:37 +01:00

Merge branch 'w51_MDL-37315_m25_ldappaging' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2013-01-07 09:09:50 +13:00
commit 9ae14001aa

@ -653,7 +653,7 @@ class enrol_ldap_plugin extends enrol_plugin {
* @param object role is a record from the mdl_role table.
* @return array
*/
protected function find_ext_enrolments ($ldapconnection, $memberuid, $role) {
protected function find_ext_enrolments (&$ldapconnection, $memberuid, $role) {
global $CFG;
require_once($CFG->libdir.'/ldaplib.php');
@ -718,13 +718,13 @@ class enrol_ldap_plugin extends enrol_plugin {
// Get all contexts and look for first matching user
$ldap_contexts = explode(';', $ldap_contexts);
$ldap_pagedresults = ldap_paged_results_supported($this->get_config('ldap_version'));
$ldap_cookie = '';
foreach ($ldap_contexts as $context) {
$context = trim($context);
if (empty($context)) {
continue;
}
$ldap_cookie = '';
$flat_records = array();
do {
if ($ldap_pagedresults) {