Hi.

I think I found a bug in LDAP module. I have the module active and I select "Drupal's DB first, then LDAP directory" as authentication mode.
LDAP users can login and If I create a new Drupal user, everything seems ok, since the new user can login also. But if I enter editing the new user (even leaving everything unchanged and simply submit the form), from this moment on the new Drupal user can't login anymore.

I think this is due to the fact that when I create a new Drupal user, only a subset of the user fields are filled, while if I enter editing a user, all the user fields are filled.
I notice, in particular, that when I enter editing the user, in the data field are added the values for ldap authentication (ldap_autentified=0, ldap_dn=''), that simply say that this is not a LDAP user.

But in ldapauth.module in _ldapauth_user_authenticate function I found the following code:

      $local_user_count = db_num_rows(db_query("SELECT name FROM {users} WHERE data NOT LIKE '%%ldap\_authentified%%' AND name='%s'", $name));

that seems to consider a LDAP user every user that have the string ldap_authentified in its data field!

Is it correct?

Thank you.

Tiziano

Comments

scafmac’s picture

Probably not. I'll look into it.

Thanks

cpugeniusmv’s picture

I fixed this problem a couple of weeks ago and submitted a patch:

http://drupal.org/node/132594

scafmac’s picture

Status: Active » Fixed

Thanks for the patch cpugeniusmv.

I have a couple more bugs to fix before posting the next release, but it should be up shortly.

Anonymous’s picture

Status: Fixed » Closed (fixed)