Backport subset of #4179, re-established Oracle compatibility for LDAP

Conflicts:
	apps/user_ldap/lib/access.php