whos_online::user_ids (public)
whos_online::user_ids [ -all ]
Defined in packages/acs-tcl/tcl/whos-online-procs.tcl
This function returns a list of user_ids from users which have requested a page from this Server in the last 10 min and aren't set to invisible.
- Switches:
- -all (optional, boolean)
- Set this flag if you want to include invisible users.
- Author:
- Bjoern Kiesbye
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- whos_online__check_online_visibility
Source code: array set last_hit [nsv_array get last_hit] set onliners [list] set oldtime [expr {[ns_time] - [interval]}] for { set search [array startsearch last_hit] } { [array anymore last_hit $search] } {} { set user_id [array nextelement last_hit $search] if { $last_hit($user_id) > $oldtime } { # User is online if { $all_p || ![user_invisible_p $user_id] } { # And he's not invisible, or we want all users lappend onliners $user_id } } } array donesearch last_hit $search return $onlinersXQL Not present: Generic, PostgreSQL, Oracle