Added is_ldap_user helper function