Gracefully bail out if the LDAP server is unavailable.

Work sponsored-by: Centipede Networks
This commit is contained in:
Scott Ullrich 2007-12-31 06:33:37 +00:00
parent c4e2e864c0
commit 0b5ed732ed

View File

@ -85,6 +85,10 @@ if($_POST) {
<?php
$ous = ldap_get_user_ous(true);
$pconfig['ldapauthcontainers'] = split(";",$config['system']['webgui']['ldapauthcontainers']);
if(!is_array($ous)) {
echo "Sorry, we could not connect to the LDAP server. Please try later.";
exit;
}
foreach($ous as $ou) {
if(in_array($ou, $pconfig['ldapauthcontainers']))
$CHECKED=" CHECKED";