// we should check all servers, but lets just go with 0 for now
$cnt = ldap_connect($servers[0]["target"], $servers[0]["port"]);
+ldap_set_option($cnt, LDAP_OPT_PROTOCOL_VERSION, 3);
echo "Connected\n";
$bind = ldap_bind($cnt, "$adlogin", "$adpass");
if($bind) {
//echo "real function is $function_send, $function_recv\n";
if(function_exists($function_send)) {
- $fromsend = $this->sendReceive($st_defined, $function_send($params)));
+ $fromsend = $this->sendReceive($st_defined, $function_send($params));
if(function_exists($function_recv)) {
return $function_recv($fromsend);
} else return $fromsend;
$return = "init";
if($initState != false && $backEnd != "") {
$return = "running";
+ $be = confGetVal("backend");
+ if($be == "AD") {
+ $dom = confGetVal("ad.domain");
+ $user = confGetVal("ad.user");
+ $client = confGetVal("ad.clientdef");
+ $admin = confGetVal("ad.admindef");
+ $return .= " - AD integrated to $dom, GAASD Username: $user, Clients Group: $client, Admins Group: $admin";
+ } else {
+ $return .= " - internal database";
+ }
+
}
+
+
return $return;
}
return true;
}
+function gaasProvisionUser_server($msg)
+{
+
+ // function userInGroup($user, $domain, $adlogin, $adpass, $group)
+ userInGroup($msg["username"], confGetVal("ad.domain"), confGetVal("ad.user", $adlogin), confGetVal("ad.pass"), confGetVal("ad.clientdef"));
+
+
+ return true;
+}
+
?>
\ No newline at end of file