Function: getUsers
Parameters: array
Returns: array of detected users and their user IDs or null

Description:

getUsers returns an array of users who are currently detected by the public displays.  In other words, those who are near the system(s).  If no users are detected near any of the displays, getUsers() returns a null object.

Usage:

<?php
include_once 'situated.class.php';
$obj = new Situated();
$users = $obj->getUsers();
$ids = array();
foreach( $users as $user ) {
$ids[$user->username] = $user->id;
}
?>

<html>
<body>
<pre><?print_r($ids);?></pre>
</body></html>

Advertisements