Fixes: #2548 ldap class has unused vars and methods