i = ldap_simple_bind_s(ldserver, user_dn, password);
if (i == LDAP_SUCCESS) {
CtdlLogPrintf(CTDL_DEBUG, "LDAP: bind succeeded\n");
i = ldap_simple_bind_s(ldserver, user_dn, password);
if (i == LDAP_SUCCESS) {
CtdlLogPrintf(CTDL_DEBUG, "LDAP: bind succeeded\n");