When using auth_by_bind, search was always done as anonymous user. This is a problem if we want to fetch LDAP values which have ACL permissions only for users.
Created attachment 2357 [details] [review] do bind just once This change moves bind from search_method back into checkpw_ldap, making code cleaner and easier to understand
Created attachment 4069 [details] [review] Signed off patch
Please do not apply both this AND the fix for 5094 without testing them together. Conflict is likely as they do not anticipate each other.
I did some testing with our setup (replicate without update) at they work fine together. We have a two more tests which use WWW::Mechanize to create user in Koha to test full-cycle between our LDAP server, ldap-rewrite and koha at: http://svn.rot13.org/index.cgi/virtual-ldap/browse/t/koha
Dobrica, that is great, pushing the patch now, can you please run your tests against master.
Tested, it works fine, thanks.