function TestConnectToPureLDAP() { ConnectToPureLDAP(); if (!$GLOBALS["BIND_LDAP"]) { WLOG("[QUERY]: Error: BIND is broken -> reconnect"); ConnectToPureLDAP(); if (!$GLOBALS["BIND_LDAP"]) { WLOG("[QUERY]: Error: BIND pointer is false"); return false; } } if (!$GLOBALS["CONNECTION"]) { WLOG("[QUERY]: Error: CONNECTION is broken -> reconnect"); ConnectToPureLDAP(); } if (!$GLOBALS["CONNECTION"]) { WLOG("[QUERY]: Error: CONNECTION is definitively broken aborting !!!..."); return false; } return true; }
function TestConnectToPureLDAP() { ConnectToPureLDAP(); if (!$GLOBALS["BIND_LDAP"]) { WLOG("[QUERY]: <strong style='color:red'>Error: BIND is broken -> reconnect</strong>"); ConnectToPureLDAP(); if (!$GLOBALS["BIND_LDAP"]) { WLOG("[QUERY]: <strong style='color:red'>Error: BIND pointer is false</strong>"); return false; } } if (!$GLOBALS["CONNECTION"]) { WLOG("[QUERY]: <strong style='color:red'>Error: CONNECTION is broken -> reconnect</strong>"); ConnectToPureLDAP(); } if (!$GLOBALS["CONNECTION"]) { WLOG("[QUERY]: <strong style='color:red'>Error: CONNECTION is definitively broken aborting !!!...</strong>"); return false; } return true; }