Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v diff -u -N -r1.29 -r1.30 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 11 Apr 2013 21:53:25 -0000 1.29 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 29 Jul 2013 08:59:54 -0000 1.30 @@ -580,6 +580,25 @@ } my proc urlencode {string} {string map [my set ue_map] $string} } + + + my ad_proc user_is_active {{-asHTML:boolean false} uid} { + } { + if {[info command ::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 " " + } else { + return $active + } + } else { + ns_log notice "user_is_active requires xotcl-request monitor in a recent version" + return 0 + } + } }