When converting a local drupal account to an ldap authenticated account (by checking the "LDAP authentication settings" box and adding a user dn) the profile fields do not get updated when the user logs in via ldap. I've tried editing and submitting the user on the user account page and adjust the profile and ldap_data module weights but neither appears to do anything.

I've spent hours browsing the code issue queue and code but I'm lost.

Any suggestions would be greatly appreciated.



eriktoyra’s picture

Have you tried configuring the "DN for reading/editing attributes" under the "Advanced Configuration" option at the LDAP Data configuration? I've just discovered that my LDAP users can't change their own data and it has to be done with the admin/manager user that I have setup on the LDAP server. This can be configured in this form field. However, I'm struggling with how to write the password for the DN. Where should I write the password in the DN dn=admin,dc=example,dc=global?

Edit: Solved my problem with how to input the password. You will have to check the "Clear current password" field and then save. Then the field for adding a new password will be shown. Enter your password there and everything should work fine (assuming you have the correct DN and password that is).

WorldFallz’s picture

Thanks very much for the reply. The only problem is users cannot have the ability to edit those fields (either through d6 or AD)-- the data is strictly controlled by HR and IS. I just want to take the current values from the AD fields and populate the proper mapped drupal profile fields with the data when a local account is converted over to an ldap account.

It works perfectly when a NEW user logs in for the first time, just not when I convert a local drupal account to an LDAP integrated one.

eriktoyra’s picture

Ah... now I see what you mean.

I think we are using different versions of the LDAP module. I'm using 5.x-1.3, while you (and this is just an assumption) is using a 6.x version since you wrote "(either through d6 or AD)".

I did a quick try with what you describes above and I made it work with the following setup using LDAP module 5.x-1.3.

1) Configured the LDAP server integration.
2) After having converted all current Drupal accounts to LDAP accounts I changed the "Authorization method" setting under "System Wide Option" for the "LDAP Integration" to "LDAP directory only".
3) I'm using the Profiles module to hold additional data for a user. What you need to do now is to setup the LDAP Data module to use "Same, but read-only mode" for the "Drupal-LDAP fields mapping". If you look at the Profile fields listed on this configuration page you might see that some of your LDAP fields are missing. This can be fixed by configuring the file "modules/ldap_integration/ldap_integration/ldapdata.conf.php".

With this setup I have managed to make all Drupal fields that I have mapped to LDAP fields to be updated for both new accounts and converted Drupal accounts. I hope that this will be of help to you.

If you're not using the 5.x-1.x-dev version as stated in the "Version" information about this issue, please change it to the version you are using. This will help you and the maintainers of this module to better locate possible problems.

Good luck!

johnbarclay’s picture

Status: Active » Closed (won't fix)

Closing 5.x issues to clean out issue queue.