From e8c826524edc0d6453a0edc2895b80bc37657877 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 5 Nov 2007 14:59:07 +1300 Subject: [PATCH] Minor sanity checking for enabling LDAP options. --- htdocs/tools.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/tools.php b/htdocs/tools.php index 18df1c44..b64c0eba 100644 --- a/htdocs/tools.php +++ b/htdocs/tools.php @@ -20,7 +20,7 @@ require_once("classBrowser.php"); if ( !$session->AllowedTo("Admin" ) ) exit; -if(isset($_POST['Sync_LDAP'])){ +if( function_exists("sync_LDAP") && isset($_POST['Sync_LDAP'])){ sync_LDAP(); } @@ -38,7 +38,7 @@ class Tools { function render(){ global $c; echo $this->renderImportFromDirectory(); - if($c->authenticate_hook['call'] == 'LDAP_check'){ + if ( $c->authenticate_hook['call'] == 'LDAP_check' && function_exists("sync_LDAP") ) { echo $this->renderSyncLDAP(); } }