joomla-cms
joomla-cms copied to clipboard
Fix "bind and search" on php8
Pull Request for Issue #38672 and #37060 .
I am aware this probably won't be accepted in Joomla 3 anymore, but I wanted to check this problem anyway and give those people a solution.
Remark for people needing this: please test your website using LDAP authentication on Joomla 4. It has some issues currently and the solutions need some testing. This ensures it will work once you need to upgrade to Joomla 4. Thanks! If you need the fixes, here they are:
- #37959
- #37962
- #38388
Summary of Changes
As php8 returns an instance of LDAP\Connection instead of a resource, check for it.
Testing Instructions
Log in using LDAP "search and bind" method using php8
Actual result BEFORE applying this Pull Request
It fails: "Username and password do not match or you do not have an account yet."
Expected result AFTER applying this Pull Request
It succeeds
Documentation Changes Required
none
Thank you very much Adjusted
Thank you very much Adjusted
@jsfernando Does that mean you have successfully tested this pull request (PR)? If yes, please go to the pull request in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/38750 and mark your test result by using the blue "Test this" button at the top left corner, selecting your test result and then submit. Thanks in advance.
Thank you for this pull request. This will indeed not go into 3.x anymore, but it does help users who run into this issue. We do want to clean up our PR list and thus will close this here. Still, I'd like to thank you also for your other PRs which fixed issues in LDAP and introduced the tests in 4.x.
Once again, php developers show their lack of seriousness. Modifying a function by mocking the consequences is bullshit.