We use Active Directory and do not use the mail field, so I need to generate the email address from a template. We use the person's logon name, which is equivalent to sAMAccountName, in the template. So I want to use something like [samaccountname]@example.com. The only problem is when the user logs in for the first time and gets auto-created, the generated email address is exactly [samaccountname]@example.com, rather than jdoe@example.com. So for some reason sAMAccountName isn't being brought along with the returned LDAP information. I tried switching the template to [cn]@example.com and that get's replaced with John Doe@example.com, which is what I expected.

Any clue as to what the problem could be here? This is kind of a show stopper.

Comments

johnbarclay’s picture

Title: samaccountname token not being replaced with actual samaccountname value when generating email address » LDAP Authentication: samaccountname token not being replaced with actual samaccountname value when generating email address

I would check for case sensitivity in the token. I test on active directory, so I should be able to replicate and fix this when I get a chance.

johnbarclay’s picture

Version: 7.x-1.0-beta12 » 7.x-1.x-dev
Component: User interface » Code
grahl’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This should be fixed in 2.x, please reopen if this is still relevant.