X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=authserver%2Flib%2FauthClient.php;h=22a08b318ea6b00dfcf231046b9e254f7805cb3a;hb=b01c2819480261bd5c94de2bf05533c9e82a6ab2;hp=a3a2172990192060e551e8e3a12a5d32ab3807ef;hpb=3354ed0d5c9f3877ac2222ac25326acd05d3d236;p=ga4php.git diff --git a/authserver/lib/authClient.php b/authserver/lib/authClient.php index a3a2172..22a08b3 100644 --- a/authserver/lib/authClient.php +++ b/authserver/lib/authClient.php @@ -144,6 +144,32 @@ class GAAuthClient { } + function getUsers() { + global $MSG_QUEUE_KEY_ID_SERVER, $MSG_QUEUE_KEY_ID_CLIENT; + + + if(!msg_queue_exists($MSG_QUEUE_KEY_ID_SERVER)) { + return false; + } + + if(!msg_queue_exists($MSG_QUEUE_KEY_ID_CLIENT)) { + return false; + } + // TODO we need to setup a client queue sem lock here + + $cl_queue = msg_get_queue($MSG_QUEUE_KEY_ID_CLIENT); + $sr_queue = msg_get_queue($MSG_QUEUE_KEY_ID_SERVER); + + msg_send($sr_queue, MSG_GET_USERS, "", true, true, $msg_err); + echo "message sent\n"; + + msg_receive($cl_queue, 0, $msg_type, 524288, $msg); + echo "message received?\n"; + print_r($msg); + + return $msg; + } + function authUserToken($username, $passcode) { global $MSG_QUEUE_KEY_ID_SERVER, $MSG_QUEUE_KEY_ID_CLIENT; @@ -239,4 +265,4 @@ class GAAuthClient { } } -?> \ No newline at end of file +?>