Skip to content
Browse files

MDL-37315 fix connection reopening in ldap paging

  • Loading branch information...
1 parent 322af44 commit e6a3c6e1a1292a48adecd33afef4d89cbdb84d51 @skodak skodak committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 enrol/ldap/lib.php
View
4 enrol/ldap/lib.php
@@ -653,7 +653,7 @@ protected function ldap_close() {
* @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 @@ protected function find_ext_enrolments ($ldapconnection, $memberuid, $role) {
// 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) {

0 comments on commit e6a3c6e

Please sign in to comment.
Something went wrong with that request. Please try again.