Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Could you add an login option, to enable the case sensitive ?
In the files "LdapServer.class.php" ligne 362, just need to add ":caseExactMatch:" like this:
$filter = '('. $this->user_attr . ':caseExactMatch:=' . $ldap_username . ')';
Thanks
Comments
Comment #1
johnbarclay CreditAttribution: johnbarclay commentedIs the caseExactMatch:= attribute a general ldap standard, or specific to a specific implementation? Since drupal doesn't use case sensitivity in its user names, this has some usability issues if 2 users have the same username with different cases. Can you explain your use case a little? Thanks. Would be fairly simple to do.
Comment #2
sir_squall CreditAttribution: sir_squall commentedHi,
The ":caseExactMatch:" match is a ldap standard option, you can look the rfc : http://tools.ietf.org/html/rfc3698#section-2.2
The case is simple, drupal is casesensitive on user login, and your query is not, is for that it will be nice if you implement an option for that.
Thanks
Comment #3
johnbarclay CreditAttribution: johnbarclay commentedDrupal handles usernames inconsistently as far as case sensitivity.
- won't allow the same username with different case in account creation
- preserves case in users.name field in database
- on logon, mixed or lowercase results will yield same results regardless of case stored in users.name
So I don't see how the ldap module can work with ldap derived usernames that are case sensitive. This is a simple thing to implement, I just don't see the use case. And without a use case its just more UI clutter and code to maintain.
Comment #4
sir_squall CreditAttribution: sir_squall commentedThe case is if a user for exemple "jean" exist in the ldap, and he first login in drupal with "Jean" with the first in upper case.
Your module ldap_autorization, file "ldap_autorization.inc" ligne: 394 , try to match the user "Jean" on the ldap but he can't find this user because he don't exist (in the ldap the user is "jean" in lower case), then your module can't match his role.
If you put the caseExactMatch:, we don't have this error, because the user drupal is equal to the user on the ldap, and your module can retreive his role information, is for that I have proposed this attribute.
Comment #5
johnbarclay CreditAttribution: johnbarclay commentedIf I understand you correctly, simply using caseIgnoreMatch by default and not giving any configuration options in the U.I. should accomplish the same result?
Comment #6
sir_squall CreditAttribution: sir_squall commentedYes you can do this, using caseIgnoreMatch by default, accomplish the same result.
Comment #7
verta CreditAttribution: verta commentedSubscribing
Comment #8
johnbarclay CreditAttribution: johnbarclay commentedComment #9
larowlan>12 months without an update