global $BASE_DIR;
// the tcp port number we use for comms
-$TCP_PORT_NUMBER = 21336;
+$TCP_PORT_NUMBER = 21356;
global $TCP_PORT_NUMBER;
define("MSG_SET_ADMIN_GROUP", 22);
define("MSG_PROVISION_USER",23);
define("MSG_GET_USERS", 24);
+define("MSG_DELETE_USER", 25);
// the gaasd call's $MESSAGE[<MSG>]_server() for the server side
// and $MESSAGE[<msg>]_client() for the client side
$MESSAGES[MSG_SET_ADMIN_GROUP] = "gaasSetAdminGroup";
$MESSAGES[MSG_PROVISION_USER] = "gaasProvisionUser"; // username
$MESSAGES[MSG_GET_USERS] = "gaasGetUsers"; // [admin|client], [name pattern], [only with tokens]
+$MESSAGES[MSG_DELETE_USER] = "gaasDeleteUser"; // username
global $MESSAGES;
//exit(0);
+ //echo "usercn: $usercn\n";
$basecn = preg_replace("/,$/", "", $tcn);
$sr = ldap_search($cnt, "$basecn", "(&(objectCategory=group)(member:1.2.840.113556.1.4.1941:=$usercn))");
$fil = "(&(objectCategory=group)(member:1.2.840.113556.1.4.1941:=$usercn))";
$info = ldap_get_entries($cnt, $sr);
foreach($info as $kpot => $lpot) {
if(isset($lpot["samaccountname"])) {
- if($lpot["cn"][0] == $group) return true;
+ //echo "checking: ".$lpot["cn"][0]."\n";
+ if(strtolower($lpot["cn"][0]) == strtolower($group)) return true;
}
}
return false;
$i = 0;
foreach($info as $kpot => $lpot) {
if(isset($lpot["samaccountname"])) {
- $arbi[$i]["username"] = $lpot["samaccountname"][0];
- $arbi[$i]["realname"] = $lpot["name"][0];
- $i++;
+ $arbi[$lpot["samaccountname"][0]] = $lpot["name"][0];
}
}