at LdapServer->deriveEmailFromEntry($ldap_entry) {...} on line #815: the function returns the value from array $ldap_entry whichs key is mapped to the LDAP record entry for email address. While this key is in lower case, the function looks up for a camelcase name that is stored in $this->mail_attr (here: userPrincipalName vs. userprincipalname). Therefor the function returns an empty value - the login procedure fails with the following error message:
"Another user already exists in the system with the same email address ...", new users cannot log in.

As a workaround I changed line 815 from
return @$ldap_entry[$this->mail_attr][0];
to
return @$ldap_entry[strtolower($this->mail_attr)][0];
and it works fine.

Comments

Status:Active» Fixed

thanks. this is committed. I did it a little differently because I'm trying to run all the case conversions through a single function. More for accounting and change management than anything. Here's the line:

return @$ldap_entry[ldap_server_massage_text($this->mail_attr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)][0];

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Version:7.x-1.0-beta10» 7.x-2.x-dev
Status:Closed (fixed)» Active

I am reopening this issue and changing the version to 7.x-2.x-dev as I see this problem on the 2.x series as well (using userPrincipalName for mail attribute).

Does this problem still exist in the current 7.x-2.x-dev?

Status:Active» Postponed (maintainer needs more info)

Anyone still running across this in the 7.x-2.x branch. This has simpletest coverage, but not sure how compete it is.

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)