skip ldap security check if ldap auth is disabled in config

This fixes issue #7213 which is a reincarnation of issue #6188
What do you think about moving the `Gitlab.config.ldap.enabled` part into the `User#requires_ldap_check?` method?