xowiki::utility proc user_is_active (public)
xowiki::utility user_is_active [ -asHTML on|off ] uid
Defined in /var/www/openacs.org/packages/xowiki/tcl/xowiki-utility-procs.tcl
Tell whether a user is active according to the Request Monitor.
- Switches:
- -asHTML (optional, boolean, defaults to
"false"
)- when true, the proc will return an HTML rendering of the user information.
- Parameters:
- uid (required)
- the user id
- Returns:
- boolean or HTML according to the 'asHTML' flag.
- Testcases:
- No testcase defined.
Source code: if {[info commands ::throttle] ne "" && [::throttle info methods user_is_active] ne ""} { set active [throttle user_is_active $uid] if {$asHTML} { array set color {1 green 0 red} array set state {1 active 0 inactive} return "<span class='$state($active)' style='background: $color($active);'> </span>" } else { return $active } } else { ns_log notice "user_is_active requires xotcl-request monitor in a recent version" return 0 }XQL Not present: Generic, PostgreSQL, Oracle