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
Comment #1
scafmac commentedProbably not. I'll look into it.
Thanks
Comment #2
cpugeniusmv commentedI fixed this problem a couple of weeks ago and submitted a patch:
http://drupal.org/node/132594
Comment #3
scafmac commentedThanks for the patch cpugeniusmv.
I have a couple more bugs to fix before posting the next release, but it should be up shortly.
Comment #4
(not verified) commented