mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Gracefully bail out if the LDAP server is unavailable.
Work sponsored-by: Centipede Networks
This commit is contained in:
parent
c4e2e864c0
commit
0b5ed732ed
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user