Here is what I would like

When a user logs in I use an ldap for authentication. I want to use an attribute in the ldap that has the domain name attached to the user name for example bob@domain.com. So they only have to use there user name with out the domain name to log in.
I thought I saw how to do this somewhere but I can remember.

Anyone know?

Comments

suneelkn’s picture

Hi,
Please provide the LDAP integration example to get the authentication details.

eboyd16’s picture

Currently we are using AD and the sAMAccountName as the username attribute. I need to move to UserPrincipalName as the username attribute and it has the domain attached to the user name. I don't want my users to type in the domain name, just the username.
The reason is sAMAccountName is limited to 20 char in size.

Example:
Username bob
sAMAccountName bob
UserPrincipalName bob@domain.com

I hope this is what you where wanting.

thanks for the post

eboyd16’s picture

Has anyone figured this out without having to go hard code it in the LDAP package

johnbarclay’s picture

Version: 5.x-1.3 » 6.x-1.x-dev
Category: support » feature
cgmonroe’s picture

Status: Active » Fixed

The latest dev version has a hook_ldap_drupal_user_name_alter that can be used to change the Drupal name used by the ldap user. See the ldapauth.api.php in the dev for details:

For details of recent changes see: #1475272: 6.x-1.0 Release Candidate 1 Status

Status: Fixed » Closed (fixed)

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