LDAP: fix background job, resolves #3528

please review @FlorinPeter @bartv2 @schiesbn or others :)