You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
584 B
PHP
26 lines
584 B
PHP
<?php
|
|
|
|
function getManagedUIDs($manageruid) {
|
|
$client = new GuzzleHttp\Client();
|
|
|
|
$response = $client
|
|
->request('POST', PORTAL_API, [
|
|
'form_params' => [
|
|
'key' => PORTAL_KEY,
|
|
'action' => "getmanaged",
|
|
'uid' => $manageruid
|
|
]
|
|
]);
|
|
|
|
if ($response->getStatusCode() > 299) {
|
|
sendError("Login server error: " . $response->getBody());
|
|
}
|
|
|
|
$resp = json_decode($response->getBody(), TRUE);
|
|
if ($resp['status'] == "OK") {
|
|
return $resp['employees'];
|
|
} else {
|
|
return [];
|
|
}
|
|
}
|