Skip ldap if no connection

if no ldap connection is defined fallback to local database.

issue4232
review12591003