When using the setting, "Do not store users' passwords during sessions", several errors appear in watchdog when creating new users:

* LDAP Bind failure for user [...]. Error 49: Invalid credentials (twice)
* User load: user [...]'s data could not be read in the LDAP directory

This happens because the password is overwritten with a random generic password in _ldapauth_save_user(), then saved to the $_SESSION variable. The attached patch avoids this issue.

Comments

amariotti’s picture

Anybody else tested this? I may go and test it out on a test site.

amariotti’s picture

Just verified that this patch does fix the errors that come up in the log. It sure cleans things up for me. I also noticed increased speed on the initial login... could this be what is hanging up my LDAP logins initial sign in??? If so then commit this to the module please!

amariotti’s picture

I just double checked to make sure it was working and it only worked the first time. I'm still getting the following error:
User load: user username's data could not be read in the LDAP directory

Any ideas?

UPDATE: It was only on one user though (so far) so I'll keep an eye on it.

johnbarclay’s picture

Status: Active » Closed (won't fix)

Closing 5.x issues to clean out issue queue.