function _support_client_users in Support Ticketing System 6
1 call to _support_client_users()
- support_filter_form in ./
support.module - Form builder; Return form for support ticket listing filters.
File
- ./
support.module, line 3812 - support.module
Code
function _support_client_users($clid) {
static $uids = array();
if (is_array($clid)) {
$clid = implode(',', $clid);
}
else {
$clid = (int) $clid;
}
if (!isset($uids["{$clid}"])) {
$result = db_query('SELECT DISTINCT(u.uid) AS uid, u.name FROM {support_ticket} st LEFT JOIN {users} u ON st.assigned = u.uid WHERE st.client IN(%s) ORDER BY u.name ASC', $clid);
while ($account = db_fetch_object($result)) {
$uids["{$clid}"][$account->uid] = $account->name;
}
}
if (isset($uids["{$clid}"])) {
return $uids["{$clid}"];
}
return NULL;
}