<?php
...
function _get_logged_in_users() {
$result = db_query("SELECT uid FROM {sessions}");
while ($uid = db_fetch_object($result)) {
$account = user_load(array('uid' => $uid)); // $account に user オブジェクトが入る。
// do something
}
}
...
?>