MDL-67118 enrol_ldap: paged results functions deprecated php74 and up
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 27 Nov 2019 22:17:20 +0000 (23:17 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 16 Jan 2020 18:16:14 +0000 (19:16 +0100)
commitba62f54ef263b94bed32f13ea5158c9f2ba99e5d
treeed54e89269dd9b6eaeaaadb0b7bb00f8fbdac646
parent49d1ce3ac28e8281e8ef5feba03a138dde7c667e
MDL-67118 enrol_ldap: paged results functions deprecated php74 and up

Starting with php74 the following functions are deprecated:
- ldap_control_paged_result()
- ldap_control_paged_result_response()

Starting with php73, ldap servercontrols were included. One of those
servercontrols, LDAP_CONTROL_PAGEDRESULTS, is the one in charge of
controlling paged results.

So, we are going to add some conditional code here:

1) if php < 7.3, use old paged result functions.
2) if php >= 7.3, switch to LDAP_CONTROL_PAGEDRESULTS servercontrol.

With a TODO about removing 1) in Moodle 4.1, once php73 becomes required.
enrol/ldap/lib.php