// IN expects
// $m["user"] = "someuser";
// $m["pass"] = "somepass";
- echo "initstate is $initState\n";
+ echo "initstate is $initState";
if($initState) {
echo "true\n";
} else {
}
if($msg["backend"] == "AD") {
- echo "Backend is AD with params of\n";
- print_r($msg);
- echo "\n";
$backEnd = "AD";
// attempt connect to AD, verify creds
$addom = $msg["domain"];
// we should check all servers, but lets just go with 0 for now
$res = adTestLogin($addom, $adlogin, $adpass);
if(!$res) {
- echo "AD login test failed\n";
return false;
- } else {
- echo "AD login test succeeded\n";
}
confSetVal("ad.encryptionkey", generateHexString(32));
confSetVal("ad.clientdef", $adclientdef);
confSetVal("ad.admindef", $adadmindef);
+ confSetVal("backend", "AD");
$initState = true;
$backEnd = "AD";
// and that should be it... i think cept im in a forked erg.. lets assume it works, need pain i do not.
- echo "its all good at the server\n";
-
return true;
} else if($msg["backend"] == "IN") {
// this ones simpler