[API] Fix wierd ldap code.

Let's wait travis.