Forgive me if this is a duplicate/or I am missing something obvious.
I use ldapauth to sign users on against my organisation's LDAP server. I also need to get their email addresses into Drupal for event reminders. Unfortunately, I recently discover, that only a few users have "mail" fields in their LDAP profiles. However, their usernames, the cn attribute, are the front part of their email addresses.
How can I get the cn value append the domain name and set that as $mail. I'm no good with PHP and fiddling with the module and config files got me nowhere.
Thanks!
Comments
Comment #1
dubois commentedI've gotten the email address set to the CN by making the mail_attr cn; but, how do I append the domain name?
$mail = $ldap_user[$ldapauth_ldap->getOption('mail_attr')] . "@domain.com";Gives me no joy.
I've also applied this patch so that manually entered addressed don't get over-written with rubbish.
Comment #2
johnbarclay commentedClosing 5.x issues to clean out issue queue.