mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
MDL-36119 - enrol_ldap: fix php error
This commit is contained in:
@@ -341,6 +341,7 @@ class enrol_ldap_plugin extends enrol_plugin {
|
|||||||
continue; // Next;
|
continue; // Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$flat_records = array();
|
||||||
do {
|
do {
|
||||||
if ($ldap_pagedresults) {
|
if ($ldap_pagedresults) {
|
||||||
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
|
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
|
||||||
@@ -371,7 +372,6 @@ class enrol_ldap_plugin extends enrol_plugin {
|
|||||||
$records = ldap_get_entries($ldapconnection, $ldap_result);
|
$records = ldap_get_entries($ldapconnection, $ldap_result);
|
||||||
|
|
||||||
// LDAP libraries return an odd array, really. fix it:
|
// LDAP libraries return an odd array, really. fix it:
|
||||||
$flat_records = array();
|
|
||||||
for ($c = 0; $c < $records['count']; $c++) {
|
for ($c = 0; $c < $records['count']; $c++) {
|
||||||
array_push($flat_records, $records[$c]);
|
array_push($flat_records, $records[$c]);
|
||||||
}
|
}
|
||||||
@@ -725,6 +725,7 @@ class enrol_ldap_plugin extends enrol_plugin {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$flat_records = array();
|
||||||
do {
|
do {
|
||||||
if ($ldap_pagedresults) {
|
if ($ldap_pagedresults) {
|
||||||
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
|
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
|
||||||
@@ -758,7 +759,6 @@ class enrol_ldap_plugin extends enrol_plugin {
|
|||||||
$records = ldap_get_entries($ldapconnection, $ldap_result);
|
$records = ldap_get_entries($ldapconnection, $ldap_result);
|
||||||
|
|
||||||
// LDAP libraries return an odd array, really. Fix it.
|
// LDAP libraries return an odd array, really. Fix it.
|
||||||
$flat_records = array();
|
|
||||||
for ($c = 0; $c < $records['count']; $c++) {
|
for ($c = 0; $c < $records['count']; $c++) {
|
||||||
array_push($flat_records, $records[$c]);
|
array_push($flat_records, $records[$c]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user