the existence of former ldap users doesn't imply LDAP is enabled.

When ldap is disabled in the gitlab config, this fixes the API still calling the ldap backend.
This solves #6188 and is a likely cause for #4730