enabled = $enabled; $this->lib_ug = $lib_ug; $this->lib_ag = $lib_ag; $this->principal = $principal; $this->credential = $credential; $this->repository_uri = $repository_uri; $this->user_dn = $user_dn; $this->group_dn = $group_dn; $this->domain = $domain; } }; //initialize variables $errorCode = 0; $returnMessage = " "; $url = " " ; // if this is a post, then this is a request for work to be done if ($_SERVER['REQUEST_METHOD'] == "POST") { $url = $_REQUEST['url']; if( $_POST['test_ldap'] == "1" ) { test_ldap($user); $returnMessage = "The LDAP Connection Test was successfully completed."; } else { if ($_REQUEST['enabled'] == '1') { $ldap_info = new CLDAP_info( $_REQUEST['enabled'], $_REQUEST['lib_ug'], $_REQUEST['lib_ag'], $_REQUEST['principal'], $_REQUEST['credential'], $_REQUEST['repository_uri'], $_REQUEST['user_dn'], $_REQUEST['group_dn'], $_REQUEST['domain'] ); } else { $ldap_info = new CLDAP_info(0,'', '','', '','','', '',''); } set_ldap($user, $ldap_info); $returnMessage = "The LDAP Configuration was successfully updated."; } error_log( "form data = ". print_r($ldap_info, true) ); } ?>