Fixed this by assuming a failed ldap only if the search by UID also returns null.
Btw: I could not reproduce the original error of LDAP-154 - in my case the result is not null, but an exception thrown in {{ XWikiLDAPConnection.open}}. Maybe I tested the wrong scenario? I currently do not know how to check if this change does not break the fix for LDAP-154 again.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.