Ldap fix

Refer to pull request #687

With the fix below,
I'm able to get my obs server works with my ldap server.