-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
1.6
-
None
-
Linux
-
MySQL
-
MOODLE_16_STABLE
Running RHEL4 using LDAP to authenticate against Novell Open Enterprise Server (Netware) the password expiration checks fail because of the case sensitive LDAP attribute names are lowercased. See diff below.
— auth/ldap/lib.old.php 2006-05-08 10:58:22.000000000 -0500
+++ auth/ldap/lib.php 2006-05-08 10:58:45.000000000 -0500
@@ -347,13 +347,13 @@
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
if ($sr) {
$info=auth_ldap_get_entries($ldapconnection, $sr);
- if ( empty($info[0][strtolower($CFG->ldap_expireattr)][0])) {
+ if ( empty($info[0][$CFG->ldap_expireattr][0]))
{ //error_log(ldap: no expiration value.$info[0][$CFG->ldap_expireattr]); // no expiration attribute, password does not expire $result = 0; }else {
$now = time();
- $expiretime = auth_ldap_expirationtime2unix($info[0][strtolower($CFG->ldap_expireattr)][0]);
+ $expiretime = auth_ldap_expirationtime2unix($info[0][$CFG->ldap_expireattr][0]);
if ($expiretime > $now)
{ $result = ceil(($expiretime - $now) / DAYSECS); }else {
- has been marked as being related by
-
MDL-4261 strtolower()
- Closed