When an administrative user edits the profile of a local user, the "Authenticate via LDAP" checkbox and "LDAP User DN" fields are a part of the form that is submitted. Before the admin submits the form, the data field in the user database table does not contain the "ldap_authentified" or "ldap_dn" items. After the admin submits the form, those two items show up in the data field.
The problem lies within the "_ldapauth_user_authenticate" function in ldapauth.module (line 851). The query returns users that do not have the "ldap_authentified" item in their data field. After an administrative user has edited a local user's profile, however, the "ldap_authentified" item shows up in the data field regardless of whether they do or do not authenticate against LDAP. This prevents local users from being able to log in after an admin has edited his profile.
The attached patch fixes the problem by unserializing the user data and actually checking the value of "ldap_authentified". If it isn't present, false is assumed as before.
| Comment | File | Size | Author |
|---|---|---|---|
| local-user-fix.patch | 1.18 KB | cpugeniusmv |
Comments
Comment #1
scafmac commentedThanks for the patch!
Comment #2
scafmac commentedComment #3
(not verified) commented