I have LDAP Integration working nicely so I can login with a user's samaccountname but now I want to display the user's displayName instead of their cn when you view their posts etc. So I created a profile string "Display Name" and linked it to the LDAP field "displayName". I logged out and back in again but it doesn't work. I installed the Real Name module and configured that but it still doesn't work. Did I miss a step? Is anyone using this feature?

Thanks

Comments

iqbalsyamsu’s picture

I'd like to have that feature too.
Please tell me when you had the solution.

mainer’s picture

This would indeed be useful... been tinkering all weekend trying to pull in users Real Name from the LDAP attributes and use in webform... not happening yet.
I can 'see' the First Name and Last name, but no idea how to reference it or get a handle it from Webform or from RealName, etc... never thought it would be so difficult to re-use the User's info in other modules and such.

Suggestions anyone?... perhaps it is far easier than I thought and I am overthinking it? Ugggh, hope so, but I fear not....

miglius’s picture

Issue tags: +ldapdata

LDAP data module synchronizes LDAP attributes with drupal profiles. Do you mean that after configuring the ldap attribute mapping to the drupal profile field those fields are not being synchronized when the user logs in?

Please use the latest dev version of ldap_integration.

martink’s picture

I think you need to be a bit more explicit about what you have done. I have got this working as follows:
1) Activate Profile module
2) Create profile field eg "Full Name"
3) Install LDAP Authentication and Data modules
4) In LDAP Data module, configure the mapping between Drupal field and LDAP attribute (this is done on a per LDAP server basis)
5) Have a user login and check that you have recovered the LDAP attribute data in the Drupal profile
6) Install Realname module
7) Configure Realname "General" options to display Real name in nodes and to Override username theme
8) Configure Realname module to select Core Profile providing data to Realname
9) Configure Realname fields and check the "displayName" field, then put %1 in Name Pattern

This should work!

But it doesn't work absolutely everywhere - for example I'm using the contact form and it still puts the login id rather than the display name in the user name field which is a shame.

However you should see the display name in the list of users, node posts, and comment posts.

stodge’s picture

Hmm - maybe it only works if you enable the Real Name module after configuring LDAP Data. I have two test sites; one works, one doesn't. The one that works was when I followed your instructions. The site that doesn't work already had the Real Name module installed before I configured the LDAP Data. I need to verify this.

Or maybe it only works for nodes created AFTER completing your steps. Nodes created before I followed your steps still show just the login name.

Thanks

illmnec’s picture

The order of installation doesn't matter. Though the Profile field has to be created first so that you can select it in LDAP Data. Once the Profile field is created, it will appear in the list of Drupal fields that can be matched to LDAP fields.

cgmonroe’s picture

Status: Active » Closed (fixed)

Clearing out old support requests - reopen if problem still exists in newest code (dev)

A final point here - If you add the profile field/ldapauth with existing users, the profile field may not be filled until the ldapdata "trigger" occurs. E.g., sync is defined as login - no first or last name until the user logs in.

The dev version has an ldapsync module that is intended to do mass updates and help solve problems like these.